Pages: 1
Topic closed
i need to move a sprite round the board with 20 squares i have made. ie. if i press the button and it changes the varible to 4 move to square four. i get there but for the second roll i cant get it right ie. if, after i have rolled a four, i roll a 2 it takes me to square 2 not 2 more sqaures!!! can anyone help me i need help quick it is homework!!!!!!!!!!! ahhhhhhhh
Offline
Is the project on your account the most recent version of it?
EDIT: Wasn't sure whether to post this or not but meh:
Okay your board has 5 spaces on each side.
so you want something like:
a variable called CurrentPosition
and a DiceRoll
when someone rolls the dice the diceroll is pick random 1 to 6
On the character you now put:
Repeat (DiceRoll) If <(CurrentPosition) < [6]> point in direction [0 v] else if <(currentposition) < [11]> point in direction [90 v] else if <(currentposition) < [16]> point in direction [180 v] else if <(currentposition) < [21]> point in direction [-90 v] end end end end move [30] steps change (currentposition) by [1] if <(currentposition) > [20]> change (currentposition) by [-20] endAs this is homework preferably you'll work out a method of your own but if you do use this or something like it make sure that you understand why it works.
Last edited by Smozzick (2012-03-02 15:31:10)
Offline
Sorry, Im really bad at Scratch at the mo But, I may b able to help you...
Offline
Topic closed
Pages: 1