Anyone know how this works?
I'm hoping to pick up events and act according to that event, e.g. damage or killed.
I think to pick up these events you need to create a listener waiting for that event to happen but I'm not sure!
Anyone got any idea?
Help with CreateListener
Moderator: Moderators
Help with CreateListener
[VS-UK]Capt.Parts[BnHQ]
maybe if I put this into context it will help.
I know there are player events for damage and killed. I know you can do waittill dead, however I have no idea of how to pick up the event damage or killed and analyse the parameters.
The killed event is defined as:
killed( Entity attacker, Integer damage, Entity inflictor, Vector position, Vector direction, Vector normal, Integer knockback, Integer damageflags, Integer meansofdeath, Integer location )
below is the code from the killed.scr script in global. This seems to a handler for the killed event, I've no idea if this actually gets called and how.
I know there are player events for damage and killed. I know you can do waittill dead, however I have no idea of how to pick up the event damage or killed and analyse the parameters.
The killed event is defined as:
killed( Entity attacker, Integer damage, Entity inflictor, Vector position, Vector direction, Vector normal, Integer knockback, Integer damageflags, Integer meansofdeath, Integer location )
below is the code from the killed.scr script in global. This seems to a handler for the killed event, I've no idea if this actually gets called and how.
Code: Select all
start local.attacker local.damage local.inflictor local.position local.direction local.normal local.knockback local.dflags local.meansofdeath local.location:
self.fact = local CreateListener
self.fact.attacker = local.attacker
self.fact.damage = local.damage
self.fact.inflictor = local.inflictor
self.fact.position = local.position
self.fact.direction = local.direction
self.fact.normal = local.normal
self.fact.knockback = local.knockback
self.fact.dflags = local.dflags
self.fact.meansofdeath = local.meansofdeath
self.fact.location = local.location[VS-UK]Capt.Parts[BnHQ]
