Quote:
Originally Posted by meng
no weapon either. pretty sure the event isnt called. would make sense since death by bomb doesnt count as a death in the players score. intercepted by the engine!
|
Now my head is screwed on, is there a bomb event (aha lateral thinking) that is called by the bomb? When it occurs, have it check for any deaths within a given timeframe.
For example (Pseudo Code warning!)
Code:
public BombPreEvent()
{
StoreAlivePlayersToArray();
CreateTimer(0.3,Check);
}
public CheckStoredPlayers()
{
for()
{
if(Stored[X] == dead)
{
DeathByBomb[Stored[X]] = true;
}
}
}
public Action:Check(Handle:timer)
{
CheckStoredPlayers();
}
You get the idea. Store all the currently alive players to an array *before* the bomb event using a prehook, then check for any of them who have died after the bomb event has occurred and set them as death by bomb.
Obviously downside is that it might catch non-bomb related deaths during that split-second frame (unless they trigger a death_event, in which case you can tell it to set death by bomb as false again - because our bomb doesn't apparently trigger that).