Multi "if" question.

CaptFinnCaptFinn Member Posts: 1,828
edited November -1 in Working with GS (Mac)
I have 4 locations on my screen these 4 x/y will spawn 1 of 4 different actors every so often. Lets say every 5 secs.

I have a spawner called spwnloc.

It has a timer to change spwnloc to a number between 1,20

If spwnloc is currently 1
spawn actor 1 at location 1 and 3.

Can i tell it to say if spwnloc is currently 1 or 7 or 12 or 15
spawn actor 1 at location 1 and 3.

My main point is can I make one rule do something if random is 1 or 3 or 12 or 17

or do i have to make individual rules for each (if)s

Comments

  • JohnPapiomitisJohnPapiomitis Member Posts: 6,256
    have a rule set up when attribute spwnloc=1
    hit the plus sign and add when attribute spwnloc=3

    then keep hitting the plus sign to add more conditions and have those when spwnloc= 12 and the next =17

    then switch when all conditions are valid to when any conditions is valid

    cheers
  • CaptFinnCaptFinn Member Posts: 1,828
    did that. but when i do that. nothing spawns.

    I changed the random to 1,3

    then did that 3 times if=1 if=2 if=3

    nothing spawned at all.
  • tenrdrmertenrdrmer Member, Sous Chef, Senior Sous-Chef Posts: 9,934
    Change the condition to Any instead of All

    Or do
    if spawnloc=1
    --Spawn
    Otherwise
    --If spawnloc=2
    ----Spawn
    --Otherwise
    ----If SpawnLoc=3
    ------Spawn
    ----Otherwise

    AndSo on.
  • POMPOM Member Posts: 2,599
    Why not simply do :
    When ANY :
    Spawnloc = 1
    Spawnloc = 3
    Spawnloc = 12
    Spawnloc = 17

    Do the spawn ...

    Isn't that what you want ?

    Roy.
  • JohnPapiomitisJohnPapiomitis Member Posts: 6,256
    P-O-M said:
    Why not simply do :
    When ANY :
    Spawnloc = 1
    Spawnloc = 3
    Spawnloc = 12
    Spawnloc = 17

    Do the spawn ...

    Isn't that what you want ?

    Roy.

    yeah thats what i said ;)

    @Jeff post screenshots of your rules if you can. Because if its not working you have it set up wrong or something

    cheers
  • tenrdrmertenrdrmer Member, Sous Chef, Senior Sous-Chef Posts: 9,934
    Yeah Jeff. NEed to look at your rules. Three ppl now have said to change your all conditions to Any. I have a feeling you are missing that.
  • CaptFinnCaptFinn Member Posts: 1,828
    Thanks Ill look into that now.
Sign In or Register to comment.