# Board Game Help

Status
Not open for further replies.

#### Lithe

Level 2
How would i make a unit move a certain number of spaces depending on what it rolled?

#### Mr_Bean

Level 17
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:

#### Lithe

Level 2
thanks ill try it!

Status
Not open for further replies.

Replies
6
Views
852
Replies
1
Views
738
Replies
8
Views
729
Replies
11
Views
724
Replies
1
Views
410