Referencing other actor's attributes
henshouse
Member Posts: 2
I just joined, and immediately followed the Pong tutorial in the wiki. I got it all working fine, but wanted to make it 1 player, rather than 2. So I tried adding my own AI that basically just follows the Y position of the ball. I couldn't get this to work because when I wanted to check if the Y position was higher or lower than the paddle's Y position, I was only allowed to check game and self attributes, not other actor's attributes.
Thanks for your time
Thanks for your time
Comments
Hope thats helps
Inside ball actor constrain bally to self.position.y
Inside paddle actor constrain self.position.y to bally
shakirovruslan2008@gmail.com
Double click the instance of an actor – one of them on screen – then unlock the Rules section if it's not already. Then within its Rules, you can get to any other actor's attributes by the following method:
Click the three dots to get the attribute browser, or the "e" to get the expression editor. In either one, click Current Scene > layers > Background > then you'll find a list of all the actors in the scene to choose, then choose its particular attribute to change/modify.
:-)
---------------------------------------------------------------
Spiral Gyro Games
""You are in a maze of twisty passages, all alike." - Zork temp domain http://spidergriffin.wix.com/alphaghostapps
Wow. How did i not know this. I thought I had GS sussed, geeez, thanks!
---------------------------------------------------------------
Spiral Gyro Games
""You are in a maze of twisty passages, all alike." - Zork temp domain http://spidergriffin.wix.com/alphaghostapps