Multiple hit points with multiple spawning actors
reddotinc
Member Posts: 653
I have just had a look at TSB's tutorial: http://gamesalad.com/wiki/how_tos:gsc_how_to_have_more_then_one_hit_points# , and whilst that is great, I'm trying to work out how I could use this when I have more than one enemy on the screen at any one time.
There are sometimes two of a specific type of enemy on the scene, and obviously I can't set this in the actor's rules as the two would conflict.
Any idea how I would be able to constrain the x,y of multiple actors to allow this to work for me?
Thanks
There are sometimes two of a specific type of enemy on the scene, and obviously I can't set this in the actor's rules as the two would conflict.
Any idea how I would be able to constrain the x,y of multiple actors to allow this to work for me?
Thanks
Comments
scene:
game.enemy_id=1;
enemy actor:
self.id = game.enemy_id
game.enemy_id = game.enemy_id+1
if(game.enemy_id > 2 ) game.enemy_id=1
if(self.id=1)
enemy1X=self.Position.X
enemy1Y=self.Position.Y
if(self.id=2)
enemy2X=self.Position.X,
enemy2Y=self.Position.Y
Anyone else have any ideas?