• Listen to a special audio message from Bill Roper to the Hive Workshop community (Bill is a former Vice President of Blizzard Entertainment, Producer, Designer, Musician, Voice Actor) 🔗Click here to hear his message!
  • Read Evilhog's interview with Gregory Alper, the original composer of the music for WarCraft: Orcs & Humans 🔗Click here to read the full interview.
  • The Hive's 22nd Icon Contest: Creep Abilities is now concluded, time to vote for your favourite set of icons! Click here to vote!
  • ✅ The POLL for Hive's Texturing Contest #34 is OPEN! Vote for the TOP 3 SKINS! 🔗Click here to cast your vote!
  • ✅ The POLL for Hive's Techtree Contest #20 is OPEN! Vote for the TOP 3 FACTIONS! 🔗Click here to cast your vote!

[Solved] Waits in Loops (I know, this isnt new)

Status
Not open for further replies.
Level 3
Joined
Dec 25, 2016
Messages
39
Hey,

So im making a map where heroes are controlled by AI (first time making trigger based AI).

I had a trigger that looked like this (of course a lot more complex)

sHhK6UZ.png


The importance of the wait command is that, if not, all heroes take actions at the exact same time. It feels weird when you are playing. They change action in the exact same moment.
As you may expect, this trigger was very very buggy.

I tried a more complex way with countdown timers that looks like this:

NXdtTxO.png

with this other trigger:

LW65GAB.png


But it kept happening the same thing (all take new actions at the same time), but more buggy

So my issue is the following:
-How to command wait lines inside a loop or simulate that

Thanks!!
 
The problem is likely that IntegerA is probably getting overwritten during the waits. You can make an integer and then use "For each integer <Variable> from _ to _ do..." instead of the generic IntegerA or IntegerB loops. This will prevent them from being overwritten by other actions.
 
Status
Not open for further replies.
Back
Top