Forum

> > CS2D > Scripts > Specific 'KILL' hook
Forums overviewCS2D overview Scripts overviewLog in to reply

English Specific 'KILL' hook

7 replies
To the start Previous 1 Next To the start

old Specific 'KILL' hook

Mami Tomoe
User Off Offline

Quote
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?

old Re: Specific 'KILL' hook

GeoB99
Moderator Off Offline

Quote
I think you misunderstood those special values of cs2d lua hook kill. 239 is merely for entities (check the reference twice) instead for turrets. That's self explanatory. Moreover, I am pretty sure you meant cs2d cmd spawnobject judging from "I want to get a turret" in the thread description. It's impossible to acquire a turret within kill hook.

old Re: Specific 'KILL' hook

DC
Admin Off Offline

Quote
@user 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.

@user 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.

old Re: Specific 'KILL' hook

Yates
Reviewer Off Offline

Quote
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.

old Re: Specific 'KILL' hook

DC
Admin Off Offline

Quote
Oh, for KILLING a turret. Not for getting killed by a turret... well, that's a completely different thing. Just use cs2d lua hook objectkill then!

old Re: Specific 'KILL' hook

Yates
Reviewer Off Offline

Quote
@user 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.
To the start Previous 1 Next To the start
Log in to reply Scripts overviewCS2D overviewForums overview