CS2D
Scripts
Specific 'KILL' hook
Specific 'KILL' hook
7 replies I've taken a look at this and found out that the ID of buildings is 239, my problem is that I only want to get a turret and not any building.
Example:
TURRET I = 1000$
TURRET II = 1500$
TURRET III = 2000$
(I need it for a script)
So how can I use it? I think you misunderstood those special values of
kill. 239 is merely for entities (check the reference twice) instead for turrets. That's self explanatory.
Moreover, I am pretty sure you meant
spawnobject judging from "I want to get a turret" in the thread description. It's impossible to acquire a turret within kill hook. DC Admin
Offline
@
GeoB99: I'm pretty sure that with "get a turret" he means he wants to check if he was killed by a turret (and not any other building like a gate field for instance). Moreover he wants to check the level of the turret that killed him.
@
Mami Tomoe: I don't see a solution. I think it's not possible to find out what exactly killed you - at least not in a reliable way
I will consider to improve some related hooks so they contain the related object ID. As a workaround you could change the turret damage to something you could easily recognise and use the hit hook to ignore it and take off the players HP with the normal turret damage (turret II should be, I think, two times the damage, so still recognisable). Then you could see whether the turret would kill the person and go on from there.
That's pretty much the only solution I see right now. I want to get money from killing a turret ._. (see examples above)
Is that possible? DC Admin
Offline
Oh, for KILLING a turret. Not for getting killed by a turret... well, that's a completely different thing. Just use
objectkill then! @
DC: But you're still going to expand the stuff you can obtain from getting killed by right? Would be awesome to script a death recap. DC Admin
Offline
@
Yates: Yes, it shouldn't be a big deal to add it. It's on my todo.