• 🏆 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] Need help with "dice" movement

Status
Not open for further replies.
Level 4
Joined
Jun 22, 2009
Messages
63
I want to make a dice that works like this:
I get 1,i walk one step forward,2 and so on.
But i use regions to move around, how do i make a trigger to move to for example 4 steps forward if im on the 12th circle, instead of making 1200 triggers or a spam of variables?

  • Player 1
    • Events
      • Player - Player 1 (Red) Presses the Up Arrow key
    • Conditions
      • Turns[1] Equal to True
    • Actions
      • Set Dice[1] = (Random integer number between 1 and 6)
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • Dice[1] Equal to 1
        • Then - Actions
          • Game - Display to (All players) the text: ("A small step for a man, but a even smaller step for + ((Name of (Triggering player)) + !"))
        • Else - Actions
          • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
            • If - Conditions
              • Dice[1] Equal to 2
            • Then - Actions
              • Game - Display to (All players) the text: ((Name of (Triggering player)) + walks 2 steps. Better hurry up boy!)
            • Else - Actions
              • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                • If - Conditions
                  • Dice[1] Equal to 3
                • Then - Actions
                  • Game - Display to (All players) the text: ((Name of (Triggering player)) + walks 3 steps. Well.....Better than 1 and 2 i guess....)
                • Else - Actions
                  • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                    • If - Conditions
                      • Dice[1] Equal to 4
                    • Then - Actions
                      • Game - Display to (All players) the text: ((Name of (Triggering player)) + walks 4 steps. Keep going like this and you will win in notime!)
                    • Else - Actions
                      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                        • If - Conditions
                          • Dice[1] Equal to 5
                        • Then - Actions
                          • Game - Display to (All players) the text: ((Name of (Triggering player)) + walks 5 steps. Just lucky!)
                        • Else - Actions
                          • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                            • If - Conditions
                              • Dice[1] Equal to 6
                            • Then - Actions
                              • Game - Display to (All players) the text: ((Name of (Triggering player)) + walks 6 steps. Forget what i said about number 5,THIS is true luck!)
                            • Else - Actions
+rep!
 
Level 37
Joined
Mar 6, 2006
Messages
9,240
Most likely by utilizing "point with polar offset". The offset is (dice*distance between regions). But hard to say without knowing more about your system.

Here's a simple checkerboard arrow movement system, maybe it helps.
 

Attachments

  • Checkerboard.w3x
    21.6 KB · Views: 46
Status
Not open for further replies.
Top