need help generating specific random positions
pranshudhungana21
Member, PRO Posts: 20
So in my game i have two actors who are obstacles once they are together. They are 2 spikes and i have 3 different ways in which the spikes could be laid out, as this a endless runner, i had difficulty in trying to find a way to randomise the 3 different way the spike could be laid out. I tried using the rng but because it can only randomize 2 way in which it could be laid out . its hard. Could anybody help with this problem?
Comments
Create an integer attribute called RANDOM
TIMER:
Every .1 seconds, change RANDOM to random(1,3)
RULE:
If RANDOM = 3, spawn spike1 on top or whatever
ELSE - if RANDOM = 2, spawn spike2 in middle or whatever
ELSEELSE- if RANDOM = 1, spawn spike3 on bottom or whatever
//
@Socks is always topping me
//
lol your good @Socks . No need to go into hiding
thanks so much