View Full Version : Spawning models
John_Clark
02-05-2008, 12:46 PM
I was just wondering if it is possible to have models spawn into the world while alice is running (example: In a FPS you kill a guy and then another guy suddenly appears.)
DickBaldwin
02-05-2008, 12:59 PM
I was just wondering if it is possible to have models spawn into the world while alice is running (example: In a FPS you kill a guy and then another guy suddenly appears.)
You cannot create new objects while the program is running in Alice 2.0. You must create all objects that will be needed before you start the program running. However, it is possible to create a bunch of objects and make most of them invisible, and cause them to become visible at the appropriate times. Another option is to reuse objects by changing their visual properties and locations and then make the reappear.
These are the kinds of things that you will learn by starting at the beginning and studying a good textbook or by studying my free online tutorials.
Dick Baldwin
Free Alice tutorials: http://www.dickbaldwin.com/tocalice.htm
Free programming tutorials: http://www.dickbaldwin.com/toc.htm
John_Clark
02-07-2008, 12:22 PM
Ok thanks, I was just opening I wouldn't have to make my game as messy as I am going to now have to... Oh well.
DrJim
02-07-2008, 12:40 PM
... hopening I wouldn't have to make my game as messy as I am going to now have to...
One other problem is that the more objects, especially 3D objects, that you add the slower (and more likely to crash) Alice gets. You might just consider one object and have it disappear when "killed" - then change textures and have the same object reappear as a new target. Even simpler, you could just alternate textures on a billboard - us alpha level transparency to make the character's background disappear (there are a couple of examples in the forum but I can't remember the character's name).
John_Clark
02-08-2008, 12:32 PM
us alpha level transparency to make the character's background disappear (there are a couple of examples in the forum but I can't remember the character's name).
I really like that idea I have a finished project of the helicoper game I'm going to post in other thread that just uses 2 boxes continiously.