• 🏆 Texturing Contest #33 is OPEN! Contestants must re-texture a SD unit model found in-game (Warcraft 3 Classic), recreating the unit into a peaceful NPC version. 🔗Click here to enter!
  • 🏆 Hive's 6th HD Modeling Contest: Mechanical is now open! Design and model a mechanical creature, mechanized animal, a futuristic robotic being, or anything else your imagination can tinker with! 📅 Submissions close on June 30, 2024. Don't miss this opportunity to let your creativity shine! Enter now and show us your mechanical masterpiece! 🔗 Click here to enter!

[BUG] Multiple Trigger Failures

Status
Not open for further replies.
So I've been pulling out my hair for the past hour because I want to stab the creator of the GE.

Turns out if you have more than 2-4 triggers using the same Region as an event, an example being [A unit enters (REGION)] it tends to simply 'shut off' the third and fourth trigger.

I created a single region.. called 'Parking Lot Enter'. If a unit with ability type ___ enters that region, it's sent to Parking Lot 1, then the trigger turns on a similar trigger* and shuts itself off.
*The similar trigger is; If a unit with ability type ___ enters that region, it's sent to Parking Lot 2, then the trigger turns on a similar trigger, and shuts itself off, etc etc.

But aparently.. the SC2 editor doesn't freakin like me.. so after the 2nd trigger, it stops bloody working all together.

Then I thought hmm.. what if I just make 4 different regions, but put them in the same spot? Nope. Same motherf---in issue. Infact if I make 4 regions and put them on top of each other, only the FIRST trigger fires. When I move the regions a smudge in different directions, so that they aren't EXACTLY on top of each other, then about 3/4 fire.

I've gone over my triggers a million times and I'm trying to figure out a way to fix this. Currently I hate life.

Essentially: BLIZZARD NEEDS TO FIX THEIR F---IN PIECE OF S--T THEY CALL A GE. And yes, trolls, I'm mad. >.>

Here are screenshots of my triggers when I try to use the 4 regions stacked on top of each other thing. This thread is to tell everyone who reads it to avoid this issue. What they can do to supplement? Call Blizzard and start screaming, that's the only thing I havn't tried yet.

Screenshot-1.png
 

Dr Super Good

Spell Reviewer
Level 64
Joined
Jan 18, 2005
Messages
27,217
Essentially: BLIZZARD NEEDS TO FIX THEIR F---IN PIECE OF S--T THEY CALL A GE. And yes, trolls, I'm mad. >.>
Essentially: You need to learn to program....

Instead of making 4 triggers like someone who has no idea what he is doing, make only 1 trigger which then uses variables to simulate 4 trigger effect you want. Only one event means none of your current problems. It also means reduced code duplication so is more efficent.

Start by setting up a boolean array of size 4.
Also create a region array of size 4. In an initialization trigger make sure you set each index to the available parking spots.
Then delete 3 of the 4 triggers and any duplicate regions used for the events. There is no longer a need for them thanks to what we have now designed.
Insert a loop between 0 and 3 (inclusive) into the action part of the code which counter I will refer to as loopa.
Remove the turn trigger off action, replace it with a error message "Parking is full" (what if more than 4 cars park?).
Insert a conditional statement into the loop. It should use the condition that if the boolean array at index of loopa is not true then do actions.
Place the order and move actions into the conditional statement's then actions and replace Center of Mall Lot 3 with the Center of region array at index loopa.
Still inside the then actions after the above step, add a line that makes the boolean array at index loopa to be true.

And there we have it... Same functionality but more efficently done so there should be no problems with events etc.
 
Status
Not open for further replies.
Top