can i do this?

diegocsdiegocs Member Posts: 531
edited November -1 in Working with GS (Mac)
spawn random actor with tag (something)?

Comments

  • magic101himagic101hi Member Posts: 713
    We need more info

    -Josh
  • diegocsdiegocs Member Posts: 531
    lets say i have many actors, but there separated by tags, so i have this actor that spawns these actors, but i want the spawning to be random by the actors tags, can it be done? ex: spawn random actor with tag(green,yellow,red), so it spawn a random actor with one of those tags?
  • gyroscopegyroscope I am here.Member, Sous Chef, PRO Posts: 6,598
    You can't spawn referring to tags, but you don't need to. Try something like:

    Timer every 3 seconds
    change attribute PickaSpawn to random(1,3)

    When PickaSpawn is 1
    Spawn Actor Green

    When PickaSpawn is 2
    Spawn actor Yellow

    When PickaSpawn is 3
    Spawn actor Red

    :-)

    ""You are in a maze of twisty passages, all alike." - Zork        temp domain http://spidergriffin.wix.com/alphaghostapps

  • diegocsdiegocs Member Posts: 531
    the thing is that red, yellow and green are tags, and various actors are under this tags. But it really doesn't matter it was to make less rules in my game.
  • gyroscopegyroscope I am here.Member, Sous Chef, PRO Posts: 6,598
    I realise that, but not knowing what you've called your actors, i put, Green, Yellow and Red, for you to substitute the actual names. But it doesn't matter now, as you say.

    ""You are in a maze of twisty passages, all alike." - Zork        temp domain http://spidergriffin.wix.com/alphaghostapps

Sign In or Register to comment.