One actor controlling others

IsabelleKIsabelleK Member, Sous Chef Posts: 2,807
edited November -1 in Working with GS (Mac)
Hello,
I'm trying to make an actor, which would be able to control other actor. I mean: when player touch actor A, then actors B and C will be f.e. destroyed.
Could you help me with this?
Thank you.

Comments

  • mediagraficamediagrafica Member Posts: 12
    You have to make 1 variable for every actor you want to control.
    I.E.
    You have "actor A" controlling "actor B".
    Create an integer variable called "actor_B_exist".
    Set the value to "1".
    Put a rule in "actor_A" ------ when actor_A is touched change attribute "actor_B_exist" to "0".
    Put a rule in "actor_B" ------ when attribute "actor_B_exist" is = "0" destroy this actor.

    Hope this will help. Bye!
  • IsabelleKIsabelleK Member, Sous Chef Posts: 2,807
    Thank you very much for help :-)
  • mediagraficamediagrafica Member Posts: 12
    ;-)
  • ORBZORBZ Member Posts: 1,304
    There is another way, direct control from one actor to another is possible within scene instances of actors, no game variables are needed. You have to break the lock of the instance to the prototype. It's more reliable than using global game attributes, but it's also very easy to goof stuff up by accidentally deleting actors or attributes you will get errors without warning so USE CAUTION with this approach.
Sign In or Register to comment.