Problem description: I'm trying to make an attack move, so how can I make a random choice to move, so I have a punch with the left hand and the right in separate frames, what should I do in a code to select such a frame? For example, when the Attack is pressed one of these frames will be randomly chosen and played sorry for my bad English |
Apr 21 2019, 2:20 pm
Best response
|
|
If you have the left hand punch and right hand punch as separate icon states in the icon, you can use pick() to pick one randomly. Just pass all the possible icon states to it and it will return one of them randomly.
|
mob/enemy/bolsonaro
new() |
In response to Klogaum
|
|
Klogaum wrote:
mob/enemy/bolsonaro He's asking how to pick a random attack animation, not how to move randomly. |