• 💀 Happy Halloween! 💀 It's time to vote for the best terrain! Check out the entries to Hive's HD Terrain Contest #2 - Vampire Folklore.❗️Poll closes on November 14, 2023. 🔗Click here to cast your vote!
  • 🏆 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!
  • 🏆 HD Level Design Contest #1 is OPEN! Contestants must create a maze with at least one entry point, and at least one exit point. The map should be made in HD mode, and should not be openable in SD. Only custom models from Hive's HD model and texture sections are allowed. The only exceptions are DNC models and omnilights. This is mainly a visual and design oriented contest, not technical. The UI and video walkthrough rules are there to give everyone an equal shot at victory by standardizing how viewers see the terrain. 🔗Click here to enter!

Board Game Help

Status
Not open for further replies.
Level 17
Joined
Feb 11, 2011
Messages
1,860
How would i make a unit move a certain number of spaces depending on what it rolled?

You would probably need to set each space as a region variable:

  • Map Setup
    • Events
      • Map initialization
    • Conditions
    • Actions
      • Set Space[1] = Space 1 <gen>
      • Set Space[2] = Space 2 <gen>
      • Set Space[3] = Space 3 <gen>
      • Set Space[4] = Space 4 <gen>
      • Set Space[5] = Space 5 <gen>
      • do this for all your spaces........
Then, when they roll the dice you issue the unit to move to another region. For example:

  • Roll Dice
    • Events
      • Unit - A unit Starts the effect of an ability
    • Conditions
      • (Ability being cast) Equal to Roll Dice
    • Actions
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • (Random integer number between 1 and 6) Equal to 1
        • Then - Actions
          • Set Temp_Integer = 1
        • Else - Actions
          • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
            • If - Conditions
              • (Random integer number between 1 and 5) Equal to 1
            • Then - Actions
              • Set Temp_Integer = 2
            • Else - Actions
              • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                • If - Conditions
                  • (Random integer number between 1 and 4) Equal to 1
                • Then - Actions
                  • Set Temp_Integer = 3
                • Else - Actions
                  • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                    • If - Conditions
                      • (Random integer number between 1 and 3) Equal to 1
                    • Then - Actions
                      • Set Temp_Integer = 4
                    • Else - Actions
                      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                        • If - Conditions
                          • (Random integer number between 1 and 2) Equal to 1
                        • Then - Actions
                          • Set Temp_Integer = 5
                        • Else - Actions
                          • Set Temp_Integer = 6
      • Set Temp_Point = (Center of Space[Current_Space[(Player number of (Owner of (Triggering unit)))]])
      • Set Current_Space[(Player number of (Owner of (Triggering unit)))] = (Current_Space[(Player number of (Owner of (Triggering unit)))] + Temp_Integer)
      • Unit - Order <your_unit> to Move To Temp_Point
      • Custom script: call RemoveLocation(udg_Temp_Point)

Note: The trigger is considering you can roll a number from 1 to 6.
Let me know if you need more help.

- Mr_Bean

EDIT: Fixed the Roll Dice trigger.
 
Last edited:
Status
Not open for further replies.
Top