PlayMaker Help & Tips > PlayMaker Help

How to export an object into another level without exporting the FSMs too?

(1/1)

Adam Z:
I'm making a character creator and I would like to export the modified character into another level.  I tried 'Additive' and 'Don't Destroy on Load', but neither of those two are giving me the results I'm looking for.

What I would like to do is to modify the character in the character creator, and have the character load into another level without bringing any Playmaker FSMs with it. So I just want the "prefab" of the character with all the adjustments made in the creator, without anything else. I also want to be able assign new FSMs to the character when it loads in a level, or other scripts such as AI and so forth.

Any thoughts on how to set that up?  Thanks.

Lane:
Hmm, thats probably very dependent on how your char customizer works. A few ideas though..

You could try the Enable FSM action to disable the FSM's when you load it in the new level.

You could not have the FSM's on the character, and do everything remotely in the customizer.

You could do a custom script to bake out the final result from the customizer.. UMA + Power Tools does this. Probably the best way, but also the most complicated I think.

You could get the scripts individually and use Destroy Component to completely removed them rather than just disable them.

Adam Z:
My thought (which now works after testing it), is to use global floats and then call those floats onto the character after the level loads.

I'm not sure if this is the best way to set it up, especially if I want to add multiplayer later in which a handful of people could have their own settings, thus making the global list quite large.

Any other ideas?

jeanfabre:
Hi,

 you'll need to have two different set of systems, one for editing and one for building. So in your game your player should only reconstruct what you have defined in your "editor". I would actually look into maintaining a flag like "In Editor" or something and if that flag is false, any fsm responsible for the editor side would get destroyed, or the opposie if true you would enable them or something.

also look at completly separating the logic for the editing and "puppet" control your character as you edit it, then it will not make any difference for the character prefab.

bye,

 Jean

Navigation

[0] Message Index

Go to full version