• 🏆 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!

Gates Loop Trigger

Status
Not open for further replies.
Level 6
Joined
Feb 6, 2015
Messages
266
Hi guys. I need help with a loop trigger that involves 3 gates and 6 levers to open/close them.

Each gate has 2 levers, one outside the city and one inside. I made 6 actions for each lever. However I couldn't get them compressed into 1 loop action.

So, perhaps the more intelligent minds can help with this.

Here are some screenies for better view of the subject.

R9FbEWe.jpg

owcXdut.jpg
 
Level 24
Joined
Aug 1, 2013
Messages
4,657
Upload triggers inside [ TRIGGER ] [/ TRIGGER ] tags :D (Inside [ HIDDEN ][/ HIDDEN ] tags.)

Your resurrect lever is kind of buggy using the hp of the last created destructable instead of full life or even a raw "infinite" value.

For the loop... it is kind of bugging me that you use "1" as the first index and have to switch my mind onto doing something really stupid...

In any case, you want to loop only over the destructables (lever) to find which lever is destroyed.
Then you want to check if Gate[IntegerA / 2] is open/close... o wait, you use "1" as first index of your arrays... lemme take a look: You want to check if Gate[(IntegerA +1) / 2] is open/close.
Then you open/close Gate[IntegerA / 2]... o wait, you use "1" as first index of your arrays... lemme take a look: You want to open/close Gate[(IntegerA +1) / 2].
 
Level 12
Joined
Nov 3, 2013
Messages
989
Each gate has 2 levers, one outside the city and one inside. I made 6 actions for each lever. However I couldn't get them compressed into 1 loop action.

Afaik you can't have waits inside loops?
 
Status
Not open for further replies.
Top