It might be the distance. Print the distance
It might be the distance. Print the distance
It was right in front of me this whole time...
Im using part of cod4's claymore script for the betty to detect movement, the betty was taking dirtopos in this case, as the thrower's direction to it's position and not letting it explode without the thrower looking at it, thanks for the help guys.Code:shouldAffectClaymore( claymore ) { pos = self.origin + (0,0,32); dirToPos = pos - claymore.origin; claymoreForward = anglesToForward( claymore.angles ); dist = vectorDot( dirToPos, claymoreForward ); if ( dist < level.claymoreDetectionMinDist ) return false; dirToPos = vectornormalize( dirToPos ); dot = vectorDot( dirToPos, claymoreForward ); return ( dot > level.claymoreDetectionDot ); }
So its fixed now?
akuma2099 (14th October 2015)
Bullettrace to the ppl
for the part where it doesn't disappear on death, if you haven't already figured it out, add something like this:
self thread killBettyOnDeath(betty, jumptrigger, trigger);
self thread killBettyOnDisconnect(betty, jumptrigger, trigger);
PHP Code:
killBettyOnDeath(betty, jumptrigger, trigger)
{
self waittill("death");
betty destroy();
jumptrigger destroy();
trigger destroy();
}
killBettyOnDisconnect(betty, jumptrigger, trigger)
{
self waittill("disconnect");
betty destroy();
jumptrigger destroy();
trigger destroy();
}
akuma2099 (16th November 2015)