[script] omgnospadingthroughwallsanymore

18 posts Page 2 of 2
a girl
Scripter
Scripter
Posts: 85
Joined: Thu Nov 15, 2012 6:32 am


Just looking at your code, I still see a relatively minor bug... if you throw a grenade over a wall, then switch to spade before it goes off, you won't get any kills... i'd have a condition statement at the beginning of your on_hit like
if grenade: #something like this, can't remember how I did it.
return connection.on_hit(...)

Edit:
I just checked my analyze script and I used this line to separate grenade damage from the rest:

if not grenade:
#do stuff

So you could do

if grenade:
return connection.on_hit(...)

Props to the idea though, this has always bothered me
Dr.Morphman
Scripter
Scripter
Posts: 73
Joined: Sun Feb 24, 2013 9:55 am


cant test it right now but

if not self.world_object.can_see(pos.x, pos.y, pos.z) and self.tool == SPADE_TOOL and not grenade and self.team != hit_player.team: return False

would solve that right?

Edit: okay solved
Last edited by Dr.Morphman on Sun Apr 06, 2014 3:41 pm, edited 1 time in total.
a girl
Scripter
Scripter
Posts: 85
Joined: Thu Nov 15, 2012 6:32 am


That should solve it... assuming you can sleep at night with super long if statements :D JK I'll probably end up using this script eventually.
18 posts Page 2 of 2
Return to “Bug Fixes”

Who is online

Users browsing this forum: No registered users and 9 guests