• 🏆 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!
  • It's time for the first HD Modeling Contest of 2024. Join the theme discussion for Hive's HD Modeling Contest #6! Click here to post your idea!

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

Status
Not open for further replies.
Level 11
Joined
Apr 15, 2020
Messages
41
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 64
Joined
Aug 10, 2018
Messages
6,531
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:
Level 11
Joined
Apr 15, 2020
Messages
41
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