Spawning Random actors at the same time in different spots

VoidedSkyVoidedSky Member Posts: 1,095
edited November -1 in Working with GS (Mac)
Hello!
So basically, I have a set of 10 different actors. I need to spawn 6 random of these actors in different spots, at the same time. I can do this, but it it takes like 60 rules, because of the random.

/RULESET ONE
(This ruleset spawns actors in Position ONE)
Rule: When attribute game.spawnActors is true
and When attribute self.actorsToSpawnInPositionOne is > 0

--Change attribute self.random to Random(1,10)

Rule: When self.random = 1
--Spawn actor: ACTOR1

Rule: When self.random = 2
--Spawn actor: ACTOR2

Rule: When self.random = 3
--Spawn actor: ACTOR3

Rule: When self.random = 4
--Spawn actor: ACTOR4

ETC......

/END RULESET ONE

/RULESET TWO
(This ruleset spawns actors in Position TWO)
Rule: When attribute game.spawnActors is true
and When attribute self.actorsToSpawnInPositionTwo is > 0

--Change attribute self.random to Random(1,10)

Rule: When self.random = 1
--Spawn actor: ACTOR1

Rule: When self.random = 2
--Spawn actor: ACTOR2

Rule: When self.random = 3
--Spawn actor: ACTOR3

Rule: When self.random = 4
--Spawn actor: ACTOR4

ETC......

/END RULESET TWO

ETC....For four more actors.......

Any ideas to make it not so processor intensive?
Thanks!
~CTM

Comments

  • VoidedSkyVoidedSky Member Posts: 1,095
    Any ideas anyone?
    ~CTM
  • simo103simo103 Member, PRO Posts: 1,331
    not sure .. but could you try assigning the random number to the end of the actor name so you would need less rules?

    I think I have seen this done with images. You would need your actors to be named Enemy1, Enemy2 or whatever and then have the a rule to interpolate that actor to an x,y position.
  • tenrdrmertenrdrmer Member, Sous Chef, Senior Sous-Chef Posts: 9,934
    Unfortunately I think you are stuck with that many rules you could probably help it some by making one invisible actor and the putting in just one rule set like you have above and then place that actor at each position you want it spawned.
Sign In or Register to comment.