Spawn actor randomly Within a certain area

Braydon_SFXBraydon_SFX Member, Sous Chef, Bowlboy Sidekick Posts: 9,273
edited November -1 in Working with GS (Mac)
Hey guys,

Can you help me to figure out how to spawn a actor randomly within a certain area?
Thanks!

Comments

  • JohnPapiomitisJohnPapiomitis Member Posts: 6,256
    In your spawn actor behaviors use the random expression in the positions

    So say you wanted to spawn an actor randomly within a iphone landscape scene you would do spawn actor then in the x position have random(0,480) and for they have random(0,320)

    The iphone landscape screen is 480x320. So 0,480 is the entire width and 0,320 is the entire height. The first number in your random is the minimum place the the second is the maximum. So you can change those numbers to spawn in whatever area you like
Sign In or Register to comment.