Advanced building menu creating unique actors

BrynjeBamsenBrynjeBamsen Member Posts: 188
edited April 2012 in Working with GS (Mac)
Picture "red alert" building a warfactory which spawns tanks.
My problem right now is - Iam having trouble with the controls of multiple tanks
Ive tried building them up with self.attributes but when i spawn tank nr 2 it reacts with tank 1 aswell

I really dont want to create 50 similar tank actors to overcome this issue.

I have some thoughs, if i could Use writable tables - but thats not yet an option

Any good idears???

Best Answer

  • tatiangtatiang Posts: 11,949
    edited June 2012 Accepted Answer
    Why are your tanks reacting with each other? Are they targeting each other, moving towards each other, ...?

    You can give each tank actor a self.ID (index) and have a counter variable game.nextTankID that starts at 1 and increases after each spawn. Then in the tank actor, have a rule that does something different based on the self.ID number.

    New to GameSalad? (FAQs)   |   Tutorials   |   Templates   |   Greenleaf Games   |   Educator & Certified GameSalad User

Answers

  • jckmcgrawjckmcgraw Member Posts: 647
    @BrynjeBamsen

    I think that you'll have to go with self attributes or make a bunch of different actors. There is no other way that I know of that you help you.
Sign In or Register to comment.