Can't Assign Mouse Position to an Attribute

Happy Holidays, all!

I have been attempting to set the value of an attribute to the mouse position attribute, but the value of the attribute always reads as "0" afterward. I have tried this with both integer and real attributes, and have even tried using the raw mouse position (of which I'm still not sure of the difference).

Ex: Change Attribute: game.x To: game.mouse.position.x

Is there something peculiar to this example or am I missing something fundamental about assigning values to Attributes?

Comments

  • IsabelleKIsabelleK Member, Sous Chef Posts: 2,807
    Did you type attribute's names by hand, or did you choose them from the list (in Change Attribute behavior)?
  • SocksSocks London, UK.Member Posts: 12,822
    . . . the value of the attribute always reads as "0" afterward.
    After what ?

  • gyroscopegyroscope I am here.Member, Sous Chef, PRO Posts: 6,598
    edited December 2012

    @GoodCaptBlake Hi, you need a condition of some sort in this case to trigger it into action, so try this:

    Rule: When mouse button is up ----or down if you prefer
    Change Attribute: game.x To: game.mouse.position.x

    ""You are in a maze of twisty passages, all alike." - Zork        temp domain http://spidergriffin.wix.com/alphaghostapps

  • SocksSocks London, UK.Member Posts: 12,822
    edited December 2012
    . . . after assigning the value of the mouse position to the attribute . . .
    How are you doing this ?

    I think the confusion (for me at least) is that you are not telling us anything about the process, only that the process you are using doesn't work.

    A screen shot of the offending rules would be cool.
  • GoodCaptBlakeGoodCaptBlake Member Posts: 1
    Gyroscope: Thank you! That works perfectly. And not surprisingly, there will always be a triggering event when I need to retrieve the value.

    Socks: Thank you again for input.
  • SocksSocks London, UK.Member Posts: 12,822
    Gyroscope: Thank you! That works perfectly. And not surprisingly, there will always be a triggering event when I need to retrieve the value.

    Socks: Thank you again for input.
    Glad you sorted it !
Sign In or Register to comment.