Jump to content

FleebJuice

Pre Member
  • Content Count

    1
  • Joined

  • Last visited

  • Medals

Everything posted by FleebJuice

  1. Thank you! I'm using this, but I ran into a bit of problem. What I wrote: Trigger: variable: irtag1 condition: !isNil "irset1" Player: init: this addEventhandler [ "Fired", { private ["_range"]; _range = 5; if (_this select 2 == "IRGrenade" && (_this select 0) distance irtag1 <= _range) then { irset1 = true; publicVariable "irset1"; }; } ]; The problem!!! I made one more trigger like this (i.e. two targets for "marking"), renamed it with _1, added another line to init with the _1. this addEventhandler [ "Fired", { private ["_range"]; _range = 5; if (_this select 2 == "IRGrenade" && (_this select 0) distance irtag1 <= _range) then { irset1 = true; publicVariable "irset1"; }; } ]; this addEventhandler [ "Fired", { private ["_range"]; _range = 5; if (_this select 2 == "IRGrenade" && (_this select 0) distance irtag1_1 <= _range) then { irset1 = true; publicVariable "irset1"; }; } ]; The thing is, no matter in what order, first one triggers, the second one doesn't. If I throw IR at A, B won't respond. If I throw at B, A won't respond. I tried adding on trigger deactivation: player removeEventHandler ["fired",0]; I also tried renaming irset1 to irset1_1 for the second trigger, didn't help. Even separated the inits with line break :D Didn't help Do you know where might the problem be? Are the addeventhandler activated alltogether on the first trigger, so there's nothing left for the second (whichever comes first)?
×