Salve,
devo realizzare uno script in cui il personaggio si muove casualmente verso Nord Est sud Ovest e si muove di 10 passi alla volta. Chiedo aiuto. Grazie
Hi,
I have to make a script where the character moves randomly to the north east south west and moves 10 steps at a time. I ask for help. thanks
Offline
lorenzobarzon wrote:
Salve,
devo realizzare uno script in cui il personaggio si muove casualmente verso Nord Est sud Ovest e si muove di 10 passi alla volta. Chiedo aiuto. Grazie
Hi,
I have to make a script where the character moves randomly to the north east south west and moves 10 steps at a time. I ask for help. thanks
Okay, well here's a script that you could use:
when gf clicked
forever
set [random v] to (pick random (1) to (4))
if <(random) = (1)>
change x by (-10)
else
if <(random) = (2)>
change x by (10)
else
if <(random) = (3)>
change y by (10)
else
change y by (-10)
end
end
end
wait (.001) secs//Optional Delay
Last edited by ErnieParke (2013-03-16 15:08:09)
Offline