Game Development Community

Adding object to the scene not by script

by DrNexus · in Technical Issues · 08/29/2006 (10:15 am) · 4 replies

Hey,

I dont find a way to add object directly from the core... I'm creating the object, register it, add it to the scene but it doesn't appear.

My code look like this :

AIBot *aiBot = new AIBot();
aiBot->registerObject();
aiBot->addToScene();

Someone have an idea ?

Thanks,
DrNexus

About the author

Recent Threads


#1
08/29/2006 (10:22 am)
I've never tried this,
but are you giving it a datablock ?

what's the failure mode ?
#2
08/29/2006 (10:52 am)
I did not find how to instanciate the GameBaseData needed for the setDatablock function.
Thx
#3
08/29/2006 (1:18 pm)
Possibly you should post this in the private engine area instead of here!

(There are actually examples of this already in the engine - check e.g. how projectiles explode)
#4
08/29/2006 (4:27 pm)
Yep, thanks for the advice Thomas, I will.