Mouse and Actor Positions… Not Universal?

bonywabonywa Member Posts: 13
edited November -1 in Working with GS (Mac)
Ok so I am new to Gamesalad. Though I do have a programming background, I am finding that it is almost useless with this interface. This thing really needs a debug window of some sort.

So I have an actor on the screen. I simply want to be able to click anywhere to the left of the actor and it moves left and click to the right it moves right. I realize (after dumbed down debugging using an extra actor with text displays) that the actor position is is based on the stage location which can be set to very large numbers. Mine is 1500 X value. However, the mouse position is only the position on the camera. So these positions will never be greater than the width of the screen size. Anybody know how to see what position in your level the mouse click occurs at?

Comments

  • spliketspliket Member Posts: 93
    you need to access the Scene.Camera.Origin.X,Y attributes. you can only do this from a scene instance of an actor, not from the prototype. once you access those, you'll need to add your mouse.position.X,Y attributes to the camera origin attributes to get the actual X,Y attributes of your mouse clicks.

    hope that makes sense.
  • bonywabonywa Member Posts: 13
    Thank you kindly. The one thing that is great about GameSalad is the community. I really do not like the game and scene object and that certain things cannot talk to each other but I guess I will figure out all the tricks eventually.
  • JohnPapiomitisJohnPapiomitis Member Posts: 6,256
    bonywa said:
    Thank you kindly. The one thing that is great about GameSalad is the community. I really do not like the game and scene object and that certain things cannot talk to each other but I guess I will figure out all the tricks eventually.

    you can trigger actors with other actors simply by creating attributes.
  • spliketspliket Member Posts: 93
    JohnPapiomitis said:
    you can trigger actors with other actors simply by creating attributes.

    yes. it has to be a game.attribute, though. not an actor attribute. all actors can access the game attributes, so, that's your common ground for interaction.
Sign In or Register to comment.