LibLoad, failed to load actions, is it a problem with the tree of the project ?

Hello everyone,

this is not my first message on BA, I had an account but I do not remember neither the name nor the password nor the mail I had chosen (I very rarely used this old account, and it was long ago). So I created a new … So I apologize to the admins and modos to let a ghost account behind me.

I come to you because I need help with BGE. I begin by briefly describe the context:

I am in charge, with others, of the development of the python part of a game project entirely made with BGE. It’s about karts, a racing game so. This project is really nice, we are a good team, and we are moving forward regularly and keep a lot of enthusiasm.

In my part I am currently facing a problem I can not solve; here is the presentation:

I am in charge of the navigation between the different game screens (menus, options, shopping, races, etc); so that the user accesses the races it goes through a blend (levels.blend that contains only an empty on which I bind my script (levels.py), in this script I call libload to load the race corresponding to the request of the player, and in the script I do this:

self.handle = bge.logic.LibLoad (blendfile, ‘Scene’, async = True)
self.handle.onFinish = self.level_loaded

levels.blend is at the root of the source folder of the game, the blends loaded with libload are in a sub-folder at the root also, these blends themselves link objects in other blends into others sub-folders also at the root.

Regarding the problem it turns out that the Actions are not loaded with the scenes … The console returns me an error message saying that actions failed to load …

What is the technique to use in order to load the scenes && the actions in that contexte?

I will be very grateful for any help offered!

In the meantime I will prepare a blend of demo for you to test it on your side.

Thank you for your attention and your possible answers!

stephane

Ps: English is not my first language… will you find which it is? ><

Have a look at the arguments :wink:

Hi Monster! :slight_smile:

Thanks for that good advice! I’ve already tried to play with all those parameters, but it’s not solving the problem at all.

I’ve managed to reduce the errors by simply doing an append of the actions in the first blend (levels.blend) from the blend that is going to be loaded by libload… and it works. There’s still other problems…

I think it would be good I provide a blend for all of you who might take a look at it…

To be continued so! But I’d like to hear from all of you if you have suggestions or ideas! Thanks!!

As far as I heard there are some problems with loading actions. This could be a cause of your issue.

I can get simple actions to play, like a door opening, and closing. But I can’t get armature actions to work.
Try one or the other code below.

SDFGeoff has a tutorial in Resources that I followed, it help alot.:slight_smile:

import bge

path_to_other_blend = bge.logic.expandPath('//Relative/path.blend')
bge.logic.LibLoad(path_to_other_blend, 'Action')

import bge

path_to_other_blend = bge.logic.expandPath('//Relative/path.blend')
bge.logic.LibLoad(path_to_other_blend, 'Scene', load_actions=True)