About Store Forum Documentation Contact



Post Reply 
How to dynamically load in units? (spawn)
Author Message
Rudyjason Offline
Member

Post: #1
How to dynamically load in units? (spawn)
Hey there, I'm making an RTS for school using your engine and I have a couple of questions;

1, I can't seem to dynamically create an object of class Chr, just doesn't work.
2, You have a better way of spawning units or any suggestions?

thank you
04-15-2010 01:14 PM
Find all posts by this user Quote this message in a reply
Esenthel Offline
Administrator

Post: #2
RE: How to dynamically load in units? (spawn)
there is tutorial in game basics/creating objects

world.objcreate
04-15-2010 01:16 PM
Find all posts by this user Quote this message in a reply
Rudyjason Offline
Member

Post: #3
RE: How to dynamically load in units? (spawn)
seeing as the art isn't finished yet I'm currently using the assets u provided with the engine. I tried using the world.objcreate function and I can spawn candles and barrels etc. but I can't seem to spawn a human, skeleton or anything like that from the Chr folder.
04-15-2010 01:21 PM
Find all posts by this user Quote this message in a reply
Xhizors Offline
Member

Post: #4
RE: How to dynamically load in units? (spawn)
(04-15-2010 01:21 PM)Rudyjason Wrote:  seeing as the art isn't finished yet I'm currently using the assets u provided with the engine. I tried using the world.objcreate function and I can spawn candles and barrels etc. but I can't seem to spawn a human, skeleton or anything like that from the Chr folder.

Game::ObjMemx<Game::Chr > chars;

Setup an object as human in world editor as OBJ_CHR.

Then setup the world to store it using .setObjType(chars,OBJ_CHR)

Now when you dynamic create this human object it will be stored in the chars memx container.
(This post was last modified: 04-16-2010 01:52 PM by Xhizors.)
04-15-2010 09:19 PM
Find all posts by this user Quote this message in a reply
Post Reply