how not move an actor with a player?

-Timo--Timo- Member Posts: 2,313
hello guys,
I want to make a door, when you hit the button with the player the door opens.
but the problem is when I hit the door with the player the door moves... :o
I want the door movable but I dont want that I can push the door with the player
plss help

Comments

  • TheGabfatherTheGabfather Member Posts: 633
    edited April 2013
    Instead of making it immovable, you can just constrain its X and Y coordinates when needed :)
  • tatiangtatiang Member, Sous Chef, PRO, Senior Sous-Chef Posts: 11,949
    edited April 2013
    So you want the door moveable (why?) but you want the player to stop when it reaches the door? Can you provide a screenshot of your game or a sketch? I'm wondering if the door is at the edge of the screen... if so, you can constrain the player's position.

    New to GameSalad? (FAQs)   |   Tutorials   |   Templates   |   Greenleaf Games   |   Educator & Certified GameSalad User

  • -Timo--Timo- Member Posts: 2,313
    when the door is movable you can move it when your player is pushing it
    when its not movable you can not move it.

    there is a door, a button and a player
    when the player touch the button the door moves up.(so you can go farther)
    but the problem is when I push the door the door moves...
    so I dont want when I push the door it moves but I want it moving when the button is pressed.
    (how can I place a screenshot?)
  • TheGabfatherTheGabfather Member Posts: 633
    edited April 2013
    Ah. You can leave it as not Movable, then when the button is pressed simply do the Rule for displacing the door's Y coordinate.

    An example would be, if Touch is Pressed on the button, change a certain boolean scene Attribute to "true" then have your door watch out for that attribute. If it is "true", Interpolate its Y coordinate upwards. Although if you will have more doors in each level, it might be best to use a single Integer attribute that increments by 1 each time, then have each door watch out for a certain integer value.

    Depending on your gameplay, the best method might vary. Just showing you that it is still possible to move an unmovable Actor through behaviors :)

    And, to post an image upload the screenshot somewhere like imgur.com and do:
    <***img src=" place your image url here"> without the ***.

    Good luck!
Sign In or Register to comment.