Ability for one actor to modify another actor's attribute

sdparduesdpardue Member Posts: 110
edited November -1 in Working with GS (Mac)
I must be missing something very simple to do. In the rule for Actor 1 , when it gets a mouseover event, how do I change an attribute of Actor 2? (I'm looking to change the Alpha from 0 to 1 for Actor 2.) Actor 2 doesn't show up in the Attribute Browser for Actor 1. Could I just type the "self.Color.Alpha" part with the name of Actor 1 in the place of "self"? If so, what's the correct syntax to refer to it?

BTW, only about 10 hours into the system so far, and it is SO AMAZING and WELL DONE! Congratulations to all who are making it happen!

Thanks,

Steve

Comments

  • CodeMonkeyCodeMonkey Head Chef, Member, PRO Posts: 1,803
    You will need to set up game attributes that can be seen by all actors. Attributes can not be accessed by literally typing in "self.Color.Alpha". They are accessed by the Attribute Browser.
  • sdparduesdpardue Member Posts: 110
    Perfect! Thanks, CodeMonkey.

    That did the trick. Very easy and powerful feature!
  • JGary321JGary321 Member Posts: 1,246
    You CAN affect another actor directly. But it must be that actors INSTANCE, not PROTOTYPE. However this is not normally something I would recommend either. I typically do game attributes like Mr Monkey says. However it does have SOME uses in special cases.
Sign In or Register to comment.