About Store Forum Documentation Contact
Donations:
309$/mo



Post Reply 
[Solved] EE 2.0 - Dynamic spawning
Author Message
Tottel Offline
Member

Post: #1
[Solved] EE 2.0 - Dynamic spawning
I'm a bit confused how to dynamically load object.

I have the Green Alien imported (and a static model too). In my code, I get the UID for the ObjParamsPtr and use both ObjCreate and ObjCreateNear, but both fail every time.

Code:
Game.ObjParamsPtr temp=UID(3695286120, 1234939607, 3884290705, 2119083346); // get enemy object parameters

   // create new object at position and give objects default scaling.
   // This object is automatically added to the Enemies container and is updated and drawn by the world manager.
   Game.World.objCreate(*temp, Matrix(temp->scale(), pos));

Am I doing something wrong with the models itself? I just dragged the .mesh files in. How do you link these with OBJ_CHR or a custom OBJ_*?
(This post was last modified: 02-17-2013 04:46 PM by Tottel.)
02-17-2013 02:39 PM
Find all posts by this user Quote this message in a reply
Esenthel Offline
Administrator

Post: #2
RE: EE 2.0 - Dynamic spawning
Hi,

It works the same way as in 1.0, please open game object editor, open "Params" tab, and set object class.

Remember that you need to set Game.ObjMemx object container to Game.World (please see "14 - Game Basics/07 - Dynamically Created Objects" tutorial)
02-17-2013 02:59 PM
Find all posts by this user Quote this message in a reply
Tottel Offline
Member

Post: #3
RE: EE 2.0 - Dynamic spawning
I had totally missed the params tab. Thanks smile
02-17-2013 03:36 PM
Find all posts by this user Quote this message in a reply
Post Reply