• 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.

Trigger to assign a turn order based on a units point value.

Status
Not open for further replies.
This is what I've been working on and it seems to half work. It displays the text above the hostile units not the players units. Any Ideas
The initial value of TopValue is 0

For each (Integer B) from 1 to 8, do (Actions)
Loop - Actions
For each (Integer A) from 1 to 8, do (Actions)
Loop - Actions
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
If - Conditions
(TurnTimeAllocation[(Integer A)] is in ActiveBattle.) Equal to False
Then - Actions
If (All Conditions are True) then do (Then Actions) else do (Else Actions)​
If - Conditions
(Point-value of TurnTimeAllocation[(Integer A)]) Greater than TopValue​
Then - Actions
Set VariableSet TopValue = (Point-value of TurnTimeAllocation[(Integer A)])
Set VariableSet TurnTimeFinal[(Integer B)] = TurnTimeAllocation[(Integer A)]​
Else - Actions
Do nothing​
Else - Actions
Do nothing​
Unit Group - Add TurnTimeFinal[(Integer B)] to ActiveBattle
Set VariableSet TopValue = 0
Floating Text - Create floating text that reads (String((Integer B))) at (Position of TurnTimeFinal[(Integer B)]) with Z offset 100.00, using font size 15.00, color (100.00%, 100.00%, 100.00%), and 0.00% transparency​
 

Uncle

Warcraft Moderator
Level 73
Joined
Aug 10, 2018
Messages
7,878
How To Post Your Trigger

So you're looping through 8 units (saved as TurnTimeAllocation) and ordering them from first to last based on their "speed" stat (point value). Units with higher "speed" go first.

I've gone over it several times and it looks like it should work fine...

Maybe TurnTimeAllocation is set to the Hostile Units instead of the Player's Units? The only thing I can think of is that TurnTimeAllocation is setup incorrectly.
 
Last edited:
How To Post Your Trigger

So you're looping through 8 units (saved as TurnTimeAllocation) and ordering them from first to last based on their "speed" stat (point value). Units with higher "speed" go first.

I've gone over it several times and it looks like it should work fine...

Maybe TurnTimeAllocation is set to the Hostile Units instead of the Player's Units? The only thing I can think of is that TurnTimeAllocation is setup incorrectly.

Thank you for the reply, but I've managed to sort the issue.
 
Status
Not open for further replies.
Top