Random actor spawn

MelodyCatsMelodyCats Member, PRO Posts: 128
edited March 2012 in Working with GS (Mac)
Hi I'm trying to get an actor to spawn randomly but at a precise point if that makes sense!

if for example I use the expression: random(100,300) it will spawn the actor randomly anywhere within a range between 100 and 300... but I can't define exactly where.

Does anyone know how I could get an actor to spawn randomly but according to say 5 precise spots for example it would spawn: either at y: 110, or 120 or 200 or 250 or 280.. ect...

I hope my explanation makes sense and really appreciate any help on this!

Comments

  • JohnPapiomitisJohnPapiomitis Member Posts: 6,256
    change the random attribute to random(1,5)

    then have rules when randomAttribute=1, change position to 110
    when randomAttribute=2, change position to 120
    when randomAttribute=3, change position to 200

    and so on

    cheers
  • MotherHooseMotherHoose Member Posts: 2,456
    http://gshelper.com/?s=tables+spawn

    Tshirtbooth's video shows how to do this … be sure to download the projectFile for it!

    @};- MH
  • MelodyCatsMelodyCats Member, PRO Posts: 128
    Wow John thank you so much for this! And for your quick response. I've been struggling for a while!

  • MelodyCatsMelodyCats Member, PRO Posts: 128
    thanks also Motherhoose! :)
Sign In or Register to comment.