Any Idea how can I randomize the result of my AI in Rock, Papers, Scissor game

Leoj24

  • Posts: 1
i'm creating a rock paper scissors game here in stencyl and i try this in the pictures and get this errors

Any Idea how can I randomize the result of my AI? thanks in advance :)

gplar

  • Posts: 1115
You have to make AI5 relate to an Attribute (RandomAI)  and assign a random value before testing for the value.
 AI5 seems to be an actor  is in your setup, but to test for value it needs to be an Attribute.
Something like this:

If mouse was pressed on Rock1
Switch animation to 1  for player 4
RandomAI = random integer between 0 and 2
              If RandomAI = 0
              Switch animation to 1 for AI5
             Otherwise if RandomAI = 1
              Switch animation to 2 for AI5
             Otherwise
             Switch animation to 3 for AI5

« Last Edit: September 17, 2016, 02:45:46 am by gplar »