Change attribute other actor

pvdmpvdm Member Posts: 7
edited November -1 in Working with GS (Mac)
I haven't used GS for a while and did an update just now. But i remember that i was able to change an attribute of an different actor in a rule of the actor.
For instance:
Rule self actor = touch -> pressed
Behaviour -> i can only choose Change attribute self.position.X = new value
I used to be able to choose -> [other actor name].position.X ??
Is that not possible? Can't i change a attribute of an other actor with a button ??

Comments

  • jadjad Member Posts: 135
    Constrain your "other actors" self.position.x to attribute y, then change attribute X from your actor
  • pvdmpvdm Member Posts: 7
    Cool thanks. I'll try that.
    But was i right? Just curious, could you in a past version call an actor by name?
  • HoneyTribeStudiosHoneyTribeStudios Member Posts: 1,792
    You still can. Double click the actor on the scene (or in the layer panel) and it will be unlocked. You can then access scene attributes and attributes of any other actor in the scene. Note that if you make any rule changes to the prototype actor - the one in the actor panel - it won't affect your unlocked actor.

    Shaz

    ------------
    image
    "...the resulting sonic effect is almost mesmerising." Pocket Gamer
    Sound design and music service available: http://tiny.cc/MusicService
    www.HoneyTribeStudios.com
  • pvdmpvdm Member Posts: 7
    @HoneyTribeStudios

    Thanks, i've tried it but i may not understand and therefor done it wrong.

    Example:
    I have made a new test game wiith just one actor. A button.
    If i press this button i want to, for example, destroy a second actor.
    So, i add a second actor.
    Add inside the first actor a rule "on pressed" (The button).
    Inside that rule i want a behaviour to destroy the second actor. Easy right?

    You can't destroy (or change any attribute) via a behaviour in the rule of a other actor.
    I don't understand this, where is this connection?
    It is objective so why is the dot syntax [actor name].[property].[value] not working anymore?

    This is a change from a previous version i had... i think.
  • pvdmpvdm Member Posts: 7
    Ok, behaviour interpolate.
    That is what i need to change a attribute of a different actor....
    Bugger.
Sign In or Register to comment.