Change actor's name?

mhedgesmhedges Raised on VCSMember Posts: 634
edited June 2014 in Working with GS (Mac)

Hello -

Let's say I have an actor named "Actor 1". If I touch/select the actor, can the actor be temporarily renamed "Actor A" until a particular event occurs? The event would lead to a(nother) change in attributes or its destruction.

Thanks, regards.

Comments

  • gyroscopegyroscope I am here.Member, Sous Chef, PRO Posts: 6,598

    Hi @mhedges You can't change an actor's name anytime during runtime but a straightforward solution for you is to simply use a boolean as a switch or trigger, so-called ... it can start out at the default false, and when you want a particular event to occur, use a Change Attribute behaviour to change the attribute to true. Providing you've already got somewhere:

    Rule: When MyAtt is true
    --do your thing
    

    It'll all work as required.

    ""You are in a maze of twisty passages, all alike." - Zork        temp domain http://spidergriffin.wix.com/alphaghostapps

  • mhedgesmhedges Raised on VCS Member Posts: 634

    Thanks for the response, gyroscope.

    What I was thinking of doing was writing one event handler for "Actor A" and "Actor B" (temporary names) so any of a number of actors could use it, then revert them back to their original names (but with some new attributes) or destroy them outright. What I want is the event handler to be reusable.

    Or am I taking the wrong approach?

  • gyroscopegyroscope I am here.Member, Sous Chef, PRO Posts: 6,598
    edited June 2014

    I think you're trying to cut corners, to be fair (OK, you're taking the wrong approach!) :wink:

    You'll need a different "event handler" (in this instance, a boolean acting as a switch) for each and every Actor you want independent of the others... I mean to say, if you just use one boolean and ActorA, ActorB and ActorC all react to this single boolean change, that's fine, if that's what you're after...

    but if you want each actor to react individually, then you'll need a boolean for each. :smile:

    ""You are in a maze of twisty passages, all alike." - Zork        temp domain http://spidergriffin.wix.com/alphaghostapps

  • mhedgesmhedges Raised on VCS Member Posts: 634

    Thanks again! Regards.

Sign In or Register to comment.