1
Resolved Questions / [Solved]Passing data in an attribute from one behavior to another?
« on: September 23, 2011, 07:04:17 pm »
I'm making a two-player game of pong. I've created an actor behavior attached to the ball that increments one of the two players' scores (as a number attribute) when the ball exits the screen on the appropriate side.
How do I display this number attribute on the scene? When I tried to create a scene behavior that referenced the number attribute attached to the ball, it doesn't show up.
Edit: Do I need to make the score a general Game Attribute? I'll try that now and see if it shows up as a universally referable attribute.
Edit 2: Haha. Yes. Yes it does. Problem solved.
How do I display this number attribute on the scene? When I tried to create a scene behavior that referenced the number attribute attached to the ball, it doesn't show up.
Edit: Do I need to make the score a general Game Attribute? I'll try that now and see if it shows up as a universally referable attribute.
Edit 2: Haha. Yes. Yes it does. Problem solved.