Why does this cause a crash?

Scripting questions, discussions, etc
3 posts Page 1 of 1
WaxyChicken
Posts: 8
Joined: Wed Mar 04, 2015 9:27 pm
by WaxyChicken » Sat Mar 21, 2015 4:34 pm
My turrets keep shooting at RigidShape objects (eg: the boulders)

so in the code i tell it to add RigidShapes to it's Ignore List.
The turret takes aim at the object, the script kicks in... and the game crashes.
why?

%obj = turret

Code: Select all

%CurrentTarget = %obj.getTarget(); if(isObject(%CurrentTarget)) { if(%CurrentTarget.getClassName() $= "RigidShape") { %obj.addToIgnoreList(%CurrentObject); // <--- this line crashes game } }
WaxyChicken
Posts: 8
Joined: Wed Mar 04, 2015 9:27 pm
by WaxyChicken » Sat Mar 21, 2015 4:37 pm
oops. never mind.
Current Object .... Current TARGET
buckmaster
Steering Committee
Steering Committee
Posts: 321
Joined: Thu Feb 05, 2015 1:02 am
by buckmaster » Sat Mar 21, 2015 9:30 pm
We should probably figure out why that crashes. Is %CurrentObject defined to be anything?
3 posts Page 1 of 1

Who is online

Users browsing this forum: No registered users and 2 guests