How to add an in-level button

bsamargiabsamargia Member, PRO Posts: 8

Hello all.
I have a hopefully simple question that I can't seem to find the answer for.
So in my game, our character can stand on his toes, essentially tippy toeing around, and I want to include in the tutorial a button that the player must press in the game to raise a wall barrier, by standing up higher and pressing the button with his elevated stance.
The problem is, I am fairly new to GameSalad, so I am unsure as to how to do so. I would really appreciate the help with this. Is there some kind of pre-made function for this, or do I have to add it myself? Please, if possible, respond as soon as possible.
Thanks-
B

Comments

  • ToqueToque Member Posts: 1,187

    Hmm. Not exactly sure what you want but....

    Add Game attribute. “Raise walll”

    Whatever triggers your Button

    Change attribute game.Raise wall true.

    In You wall you will need rule.

    Attribute. Game.Raise wall true

    Move your wall up.

  • tatiangtatiang Member, Sous Chef, PRO, Senior Sous-Chef Posts: 11,949

    Here's a demo.

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

  • bsamargiabsamargia Member, PRO Posts: 8

    @tatiang said:
    Here's a demo.

    While this is similar to what I had in mind, this is not what I am looking for. I am looking for something similar to when Mario would find a p-switch in a level, as a character he would press the button and something would happen. I am looking for something similar to this, where the in-game character would press the button and then the wall would raise

  • ToqueToque Member Posts: 1,187

    So when an actor touches something a wall rises?

  • bsamargiabsamargia Member, PRO Posts: 8

    Yes, this is pretty much what I am talking about. The only difference between this and my idea is that the character will press the button, which is basically on the floor or ceiling, and the button will recess into the ceiling or floor, the wall will open, and then it will stay open. I'm curious as to how I could do this.

  • pHghostpHghost London, UKMember Posts: 2,342
    edited December 2017

    @bsamargia said:
    Is there some kind of pre-made function for this, or do I have to add it myself?

    GameSalad doesn't really have pre-made functions of this sort. The blocks in GameSalas enable you to build logic and activate physics without needing to learn to code.

    But you still need to put together the logic and maths of what you want to happen. Whenever you are struggling with something and a user on the Forums here helps with a solution, make sure to go through the logic they supplied and try to understand what they did and why. Ask followup questions to clarify, if necessary. That's really the best way to grow in becoming a GS master. ;)

  • ToqueToque Member Posts: 1,187

    Yes. In my (our) demo the player touches button and door opens.

  • bsamargiabsamargia Member, PRO Posts: 8

    @Toque said:
    Yes. In my (our) demo the player touches button and door opens.

    Oh, well then yes, I guess that could be it, then. Would there be a way to have the button be recessed into the floor or ceiling when it is pressed, and stay pressed?

  • Twayne2Twayne2 Member Posts: 458
    edited January 2018

    Have the button actor just move to a certain position that you want...?
    Or have the button shrink so that it looks like it is ''pressed''?

  • bsamargiabsamargia Member, PRO Posts: 8

    @Twayne2 said:
    Have the button actor just move to a certain position that you want...?
    Or have the button shrink so that it looks like it is ''pressed''?

    The button shrinks into it's holder, making it look like it is pressed. The way that I have it set up is that behind the button holder is a stopper, that when the button is pressed, it is pushed up, collides with the stopper, and rests there, giving the look of being pressed. I'm curious as to how I could incorporate the button mechanics with this.

Sign In or Register to comment.