I have a gamemode that requires specific things to trigger when there is only one player alive. the playeramount varies a lot. The way I have executed this, Is that map is covered with trigger_multiple where OnStartTouch->mathcounter->add 1, and OnEndTouch->mathcounter->subtract 1. I have eventlistener that subtracts one on player_death, and triggers only once. this way the mathcounter onhitmin can trigger stuff and its working as intended. Problem is, that if someone joins server midround, for some reason it messes up with counter and it doesnt reach the minimum value. Is there way around this or some easier method to trigger stuff more consistently when only 1 player is alive?
#unqiue problem with eventlisteners
1 messages · Page 1 of 1 (latest)
There is better way to do that
Cover the area with trigger_multiple
Add this output
OnTouchingEachEntity>math_counter>Add>1
Create eventlistener with listening deaths
Add this output
OnEventFired>math_counter>setvalue>0
OnEventFired>trigger_multiple>TouchTest 0.02 delay
this will check players in the trigger_multiple in every playerdeath event
and set math_counter's value to it @pseudo lake
oh cool, thanks
any idea which part of my previous setup had issues
like im guessing the player_death activated when someone joined the team, and someone joining before anyone was dead was the problem
dont really know
either way i think it shouldnt 😄 if someone joining server really triggers player_death thats hilarious
@little mulch wouldnt this fire the mathcounter everytime someone dies
if its OnHitMin
I guess SetValueNoFire?
Yes it will. You need to use smth like this.
You could add this output to eventlistener:
OnEventFired>math_counter>GetValue 0.08 delay
And this output to math_counter
OnGetValue>logic_case or logic_compare>InValue or SetValueCompare
And use that entities to fire whatever you want
im not really sure about getvalue's delay you should try it ingame and find best one