Reply To: Spawning/destroying multiplayer objects?

FlowCanvas Forums Support Spawning/destroying multiplayer objects? Reply To: Spawning/destroying multiplayer objects?

#659
Gavalakis
Keymaster

Hey,

The Instantiate method is a static method of the Object type. The example code in the manual calls it from GameObject, because GameObject derives Object. The Instantiate method, always returns a type of Object. If you see the example code in manual, the method return value is cast to GameObject with the parenthesis. This is exactly what we also do in the flowscript with the ‘Cast To (GameObject)’ node 🙂

If you want to store the instantiated object to the blackboard, that object would be the return ‘value’ of the ‘Cast To’ node output. This value is the new instantiated gameobject, which you can do whatever you like it.

I am not sure what you mean by spawning 2 clones though 🙂 Is it possible at all to send me a small project (support@paradoxnotion.com) to see what you do and how you set it up as a whole?

Thanks!

Join us on Discord: https://discord.gg/97q2Rjh