MissionCleanup problems
by Dylan Sale · in Torque Game Engine · 12/09/2002 (7:22 am) · 4 replies
Hello, i am working on Isotope X with Eric (hes had a few dev snapshots :)) and i have run into a problem when coding oe of his wacky weapons.
Basically I can't get a projectile to delete when i want it to (not when it collides with something).
What happens is that I create a main projectile, then when the user presses fire again, it will explode into many mini projectiles causing a radius of damage. I got the detonation and everything going but when I try to delete the main projectile (it has been blown up afterall :)), it doesnt go anywhere :(.
I am using MissionCleanup.remove(%p); where %p is the projectile.
I am not getting any error messages in the console. The damn thing just wont dissapear...
Any help would be greatly appreciated
Dylan
Basically I can't get a projectile to delete when i want it to (not when it collides with something).
What happens is that I create a main projectile, then when the user presses fire again, it will explode into many mini projectiles causing a radius of damage. I got the detonation and everything going but when I try to delete the main projectile (it has been blown up afterall :)), it doesnt go anywhere :(.
I am using MissionCleanup.remove(%p); where %p is the projectile.
I am not getting any error messages in the console. The damn thing just wont dissapear...
Any help would be greatly appreciated
Dylan
About the author
#3
12/10/2002 (7:52 pm)
Dylan - why not try: %p.delete(); and see if that works. I can't rememeber off the top of my head at the moment, but, I believe that delete is valid for a projectile.
#4
I did not know you could just delete() it, hehe. It seems so simple now :)
Thanks
Dylan
12/10/2002 (8:23 pm)
cool, i havent really explored all of the methods,. in fact i only know about what i have seen in the example scripts ;)I did not know you could just delete() it, hehe. It seems so simple now :)
Thanks
Dylan
Torque Owner Dylan Sale
ie. I made a function called onDetonate that is called when fire is pressed after the initial release of the main projectile. This does damage using the radiusDamage() function, then creates the new projectiles and then deletes the original and returns.
also.. Is there any way of setting the image states using the currently exposed scripting code? (I know i could make an exposed method, but Eric doesnt really want me to change the engine much more).
ok thats it, again any help would be greatly apprectiated.
EDIT
hehe sorry, but i was also wondering if it was somehow possible to use a random number seed, much like Melvs replicator code to generate mass amounts of projectiles using one variable, rather then having to send each one over the network. I am farily certain that I would have to edit the engine for this.