Spawning Random actors at the same time in different spots
VoidedSky
Member Posts: 1,095
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
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
~CTM
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.