Collisions with an Actor (Identifying which instance of the actor)

KiwiLeeKiwiLee Member Posts: 181
edited August 2012 in Working with GS (Mac)
Hopefully an easy one for the more experienced out there......

I have a scene with 10 actors of the same type (these have a unique ID - attribute) to identify which one i.e. from 1 to 10. When they clash with another actor on the screen I want the actor that they clash into to get the ID.

If Actor (1 of 10) collides/overlaps (TargetActor)
TargetActor.ActorNumber = Actor.ID value (i.e. 1 to 10).

I'm looking for an elegant solution as I may have 20 or 30 in the future.

Any tips?
Best
Lee.

Best Answer

  • MobileRocketGamesMobileRocketGames Posts: 128
    Accepted Answer
    Using an unlocked actor (TargetActor) to specify other actors in the scene to collide with, as you are doing, is your only solution.

    Yes you will have to have 20-30 collide rules.
    Not a big deal. That's a minimal CPU load.
Sign In or Register to comment.