Actor movement over the menu bar

mojomajojomojomajojo Member Posts: 12
edited April 2012 in Working with GS (Mac)
Hello,

I have an issue with my game. I want to stop the main actor to move over an area when I click on it the area is the buttom one from the picture:

[IMG]http://i.imgur.com/tPHWl.png[/IMG]

The atributes of the actor are:

[IMG]http://i.imgur.com/IhGK5.png[/IMG]

Every time I click on the sound or on the pause menu the actor tries to move to that position this will cause a problem with the gameplay.

Can anyone help me out ?

Thanks,
Mojo

Best Answers

  • lukey5227lukey5227 Posts: 111
    edited April 2012 Accepted Answer
    If (Mouse Button is Down AND Game.Mouse_Position_Y > 50px)

    Then: Interpolate to that position.

    Explaining: If the mouse is down and is higher then 50 pixels on the screen, it'll move there. You don't have to have it set at 50 pixels, you can change this until you find it fits. Hope this helps!

    EDIT: This also means that it won't move there based on the mouse. Any reason it can move there, the mouse can still get it out and it'll stay there, not jumping out.
  • lukey5227lukey5227 Posts: 111
    Accepted Answer
    Glad I could help!

Answers

  • RPRP Member Posts: 1,990
    edited April 2012
    sounds like you need to constrain that actor so that he cannot travel to that section of your screen. Check out your constrain behavior.

    Think of it like this, checkout tshirtbooth's vids here. Might give you ideas.



  • mojomajojomojomajojo Member Posts: 12
    Hi RP,

    Thanks for your answer. I'm afraid this won't work since my actor will jump on screen when I press the mouse button to that location.

    I need to have a fluid move on the screen. Also the actor will still jump on the bellow bar when I click on it.

    Thank you,
    Mojo
  • mojomajojomojomajojo Member Posts: 12
    Thanks Lukey5227 that was it ! I can't belive it was that simple and I couldn't see it.

    Cheers,
    Mojo
Sign In or Register to comment.