Can't Delete Turrets
by David Wilson · in Torque Game Engine · 04/25/2004 (5:46 pm) · 12 replies
Using Paul Dana's awesome resource, I now have turrets!
I can't delete them. When I try to do it via script, the game performs an "Illegal Operation" and must shut down, same thing if I delete them in the world editor. Hit F11, F4, select one, delete it, BAM! Crash.
Any ideas?
Thanks!
BTW - I'm trying to delete them instead of hide them because they are still collidable objects even after they are blown up and hidden.
I can't delete them. When I try to do it via script, the game performs an "Illegal Operation" and must shut down, same thing if I delete them in the world editor. Hit F11, F4, select one, delete it, BAM! Crash.
Any ideas?
Thanks!
BTW - I'm trying to delete them instead of hide them because they are still collidable objects even after they are blown up and hidden.
About the author
#2
In my case, it works perfectly when done on a non-dedicated server, but when you do it on a dedicated server, the server crashes everytime.
If you experience this same problem, we may be able to help each other figure this out.
04/25/2004 (7:05 pm)
Do me a favor, delete a projectile object that has a long arming delay like 5-10 seconds after it has been active for a few seconds.In my case, it works perfectly when done on a non-dedicated server, but when you do it on a dedicated server, the server crashes everytime.
If you experience this same problem, we may be able to help each other figure this out.
#3
Gonzo, I can delete them on a non-dedicated server as well, on a dedicated server I'm sorry but you'll have to tell me how to do that. When I tab over to the console they seem to stop shooting until I tab back to the game?
*edit* I should point out that these are AI turrets, I haven't gotten to the mountable turrets yet.
04/26/2004 (6:32 pm)
Cameron, the last thing that hits my console log is "TurretData::OnRemove", which I see is just a function with that echoed, so I'll start hunting things down there I guess.Gonzo, I can delete them on a non-dedicated server as well, on a dedicated server I'm sorry but you'll have to tell me how to do that. When I tab over to the console they seem to stop shooting until I tab back to the game?
*edit* I should point out that these are AI turrets, I haven't gotten to the mountable turrets yet.
#4
05/03/2004 (5:31 pm)
Has there been any progress on this? I added in the turrets to my current proejct and have a similar problem. I can delete them in the mission editor...but if I destroy them ingame they seem to destroy but there collision box is still in place. Been trying to track this down for a little while now. Anyone experience this problem?
#5
Frank
05/03/2004 (9:07 pm)
Isn't there a function to turn off collision for vehicles? I remember seeing something like this. I am assuming the turrets are vehicles however.Frank
#6
I think Robert has fixed some of the projectile issues.
Frank, there are enableCollision/disableCollision calls.
05/05/2004 (10:25 am)
Mark,I think Robert has fixed some of the projectile issues.
Frank, there are enableCollision/disableCollision calls.
#7
06/10/2004 (4:47 am)
Is there anyone who has solved the crash problem yet? Because I suffer from the same problem.
#8
06/10/2004 (7:54 am)
Robert has been working on it. Have you tried the latest HEAD?
#9
06/20/2004 (7:15 pm)
I'm having the same problem aswell, and I'm running latest head.
#10
In aiTurret.cs the onRemove function should look like this:
Hope this helps.
06/20/2004 (7:44 pm)
Is this with the AI Turrets or the regular turrets? I know I had a serious problem with the AI ones, but there is a script side error in the onRemove function. In aiTurret.cs the onRemove function should look like this:
function AITurretData::onRemove(%this,%obj)
{
// remove our trigger
%trigger = %obj.getTrigger();
if (isObject(%trigger))
{
%trigger.delete();
}
Parent::onRemove(%this,%obj);
echo("AITurretData::onRemove");
}Hope this helps.
#11
06/20/2004 (7:48 pm)
Wow, quick response! Thanks alot, that did it!
#12
06/20/2004 (8:11 pm)
No problem
Torque 3D Owner Frogger