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

Complicated Trigger Help

Status
Not open for further replies.
Level 13
Joined
Aug 31, 2005
Messages
823
Im currently working on a new "boardgame" style of map. However, my only problem is I cannot get the units to move the spaces they need to. I have created a series of regions for the units to move, however the units wont advance. Can anyone help me?
Heres a copy of the trigger I have, perhaps there's something wrong with it? There is no event because the trigger is started via run trigger (checking conditions).

SART GAME TRIGGER
Conditions
(Player 1 (Red) slot status) Equal to Is playing
Actions
Game - Display to (All players) the text: ((Name of Player 1 (Red)) + will go first!)
Floating Text - Create floating text that reads 10 above Players[1] with Z offset 0.00, using font size 10.00, color (100.00%, 100.00%, 100.00%), and 0.00% transparency
Set Dice_Roll = (Last created floating text)
Trigger - Turn on Random Numbers <gen>
Trigger - Turn on Stop Dice <gen>
Unit - Unpause Players[1]
Wait 3.00 seconds
Unit - Order Players[1] to Move To (Center of Blue 1 <gen>)

Ill also paste the other two triggers.


Random Numbers (This trigger is just used to simulate a dice roll but I believe it may be part of the glitch)

Events
Time - Every 0.10 seconds of game time
Actions
Floating Text - Change text of Dice_Roll to (String((Random integer number between 1 and 10))) using font size 10.00


STOP DICE
Actions
Wait 3.00 seconds
Trigger - Turn off Random Numbers <gen>
Set Dice_integer = 5
Floating Text - Change text of Dice_Roll to (String(Dice_integer)) using font size 10.00
Wait 1.00 seconds
Floating Text - Change text of Dice_Roll to (String(Dice_integer)) using font size 12.00


Anyway if you think you can help me or if you have another way to make a player move spaces in a "dice roll" style please feel free to post.
 
Level 13
Joined
Aug 31, 2005
Messages
823
Heres another trigger im using to try and make the untis move:

Events
Unit - A unit enters Blue 1 <gen>
Conditions
Dice_integer Greater than 0
Actions
Unit - Order (Triggering unit) to Move To (Center of Blue 2 <gen>)
Set Dice_integer = (Dice_integer - 1)
Floating Text - Change text of Dice_Roll to (String(Dice_integer)) using font size 10.00

This makes it so that when the unit steps in the region, if the dice roll is greater than 0 the unit will advance to the next space. However, for some reason the unit wont move up and the "dice_Roll" text doesnt change.
 
Level 13
Joined
Aug 31, 2005
Messages
823
OMG YES! haha thanks so much! I combined them and then rewrote the trigger again for every player instead of being lazy and reusing the dice roll trigger. IT WORKS! lol Heres the trigger now incase anyone ever wants to use it for a bordgame style map in the future.

Start Game Player 1
Events
Conditions
(Player 1 (Red) slot status) Equal to Is playing
Actions
Game - Display to (All players) the text: ((Name of Player 1 (Red)) + will go first!)
Floating Text - Create floating text that reads 10 above Players[1] with Z offset 0.00, using font size 10.00, color (100.00%, 100.00%, 100.00%), and 0.00% transparency
Set Dice_Roll = (Last created floating text)
Trigger - Turn on Random Numbers <gen>
Trigger - Turn on Text stay 1 <gen>
Unit - Unpause Players[1]
Wait 3.00 seconds
Trigger - Turn off Random Numbers <gen>
Set Dice_integer = 5
Floating Text - Change text of Dice_Roll to (String(Dice_integer)) using font size 10.00
Wait 1.00 seconds
Floating Text - Change text of Dice_Roll to (String(Dice_integer)) using font size 12.00
Unit - Order Players[1] to Move To (Center of Blue 1 <gen>)
Wait until (Dice_integer Equal to 0), checking every 0.10 seconds
Trigger - Turn off Text stay 1 <gen>
 
Status
Not open for further replies.
Top