Infinite trigger execution problem

Ask any questions you may have here.

Infinite trigger execution problem

Postby enriched » 17 February 2019, 14:59

Sorry for being a beg, but how would I prevent the infinite trigger execution glitch when I type "-slots"?

Troubled map: https://www.plazmaburst2.com/?s=9&a=&m= ... &id=926551 [Made it so you can see the problem in SP]
Last edited by enriched on 23 February 2019, 16:15, edited 2 times in total.
User avatar
enriched
Recruit
 
Posts: 19
Joined: 18 August 2017, 16:07

Re: Infinite trigger execution problem

Postby Resi » 17 February 2019, 23:04

I tested the map in SP and MP and saying the command didn't do anything, but I'm gonna take a wild guess at what's going on.

I assume when you say the command you get an infinite message spam.

If this is correct:

It isn't a glitch, but rather a mistake in your map logic.

Since the values are correct, the message is meant to appear.

However, after it appears once, the value is STILL correct, so it's displayed again.

You could add a cooldown, set the trigger to 1 call...
phsc wrote:WHY ARE YOU GUYS TALKING ABOUT REALISM IN A FUTURISTIC 2D FLASH SCROLL SHOOTER THAT HAS ALIENS AND UNREALISTIC UNHOLDABLE GUNS AND REGENERATION AND MANY OTHER THINGS, LOSTMYDOLLAR/JASON EDEN PLEASE UNDERSTAND THIS IS NOT A REALISTIC GAME AND STOP TRYING TO TURN IT INTO ONE BECAUSE IT WONT
User avatar
Resi
Lite Marine [800]
 
Posts: 890
Joined: 16 July 2013, 00:47
Location: Venezuela

Re: Infinite trigger execution problem

Postby ditzy » 18 February 2019, 01:15

Right. The issue has to do with the way you set up your triggers. Specifically, you have infinite timers.

You have a trigger set up where it's constantly checking itself to see if var [teslot] is equal to your name. As long as the conditions are met (teslot value = -slots) the trigger will continue execution (causing your infinite loop problem).

Solving this is easy.

Once set as a message receiver, you don't need a timer to repeatedly call the trigger set as the message receiver. The message receiving trigger will run itself every time text is spoken in the chat.

Next, you can put the logics from #trigger*36 into #trigger*58. #trigger*36 is the trigger causing all the problems here, because its constantly being run by an infinite timer. Move the logic to #trigger*58 (the message receiver) and the logic will now only be run when text is spoken.
User avatar
ditzy
Civil Security Lite [100]
 
Posts: 121
Joined: 1 December 2017, 01:20
Location: Ponyville


Return to Questions

Who is online

Users browsing this forum: No registered users