In MMF, I have an enemy that has 3 different attacks. How do I create a random number generator or something similar so that the enemy will attack with one of the three at random with no set pattern.
I also need help with enemy movement. I want it so that when my character touches an active, then the enemy will start moving toward the character, and when it touches the character, it should stop and start an attack animations. Please help. Thanks in advance.
random is the "random" expression in MMF - it generates a random number between 0 and n-1. To get a random attack, set a counter or alterable value to random(3) when an enemy is to attack, and then perform an attack based on whether that number was 0, 1 or 2.
I'm not sure how to help with the enemy movement, because you've pretty much described how to code it in your description!
the first question is solved by:
always- set "A value" to "random(3)"
"player" colide with "enemy"+ "A value"=0 set "enemy animation attack1"
"player" colide with "enemy"+ "A value"=1 set "enemy animation attack2"
"player" colide with "enemy"+ "A value"=2 set "enemy animation attack3"
i leave the second question to someone who is better at describing programing...