GameSalad

Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!

help! display angle

jimmyraynorjimmyraynor Posts: 22Member
edited November -1 in Working with GS (Mac)
Hi all,
In the cannon template, i'm totally lost on how to display the angle of the cannon.
The cannon is directed by the mouse using the "rotate to position" behavior.

I created a game attribute called "angle" with a value of 0 and an actor called "actor display"
In the actor editor, I added the display text behavior and the text was..."game.Angle"

So as of right now, in my scene, it displays an angle of 0..now how do I make it so that the number changes with respect to the angle of the cannon?

Thanks!

Comments

  • firemaplegamesfiremaplegames Posts: 3,206Member
    In the cannon actor, constrain the game.Angle attribute that you made to the cannon's rotation...

    So:

    Constrain Attribute: game.Angle To: self.Rotation

    That way that Attribute will always be updated.
  • jimmyraynorjimmyraynor Posts: 22Member
    Ah, self.Rotation, that's what i was missing! Thanks, i appreciate it!
    Works perfectly.
This discussion has been closed.