like the title says something simple, but seems hard to acomplish, atleast for me. ok, a button, that when "pressed" causes a move tile funtion to make a higher up area accessable.
i would like to make it where once the player pressed the button simply by touching it to look like a pressed button, but once the player is not touching it to switch back to a unpressd button, pop up, pop down, simple to get it to go down but cannot follow through with the button poping back up, can someone help me?
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
Unfortunately GameDev doesn't allow you to sequence the special functions within a map, but if you can get the function that's on the button to be earlier in the list than another function which extends beyond the button by one tile in every direction (by placing it after the one on the button) then you might be able to do something like this. Have the small function (that covers only the button) cause the button to appear in pressed state and activate constantly (not just on initial touch). Have the larger function copy a piece of the map that makes the button unpressed again. It also should activate constantly. Now when you're touching both functions (near the button) it will copy the unpressed button first, and then the pressed button so when you see the painted screen, it will appear pressed. As you walk away, only the larger function will be activating which will cause the button to appear unpressed.
Another option is to just put some special functions farther away from the button that un-press it, and make sure that the player can never activate the press and un-press functions at the same time.
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
Another idea (in your case) is to just use a springboard instea of a button. The springboard can catapult the player to an area higher than is normally accessible. A springboard can be implemented with a special function that switches the player to a vector sprite with a high max velocity on a path that goes upward. Near the top of the sprite's jump you can have another special function that switches him back to a regular player sprite, retaining the original velocity.
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
like the title says something simple, but seems hard to acomplish, atleast for me. ok, a button, that when "pressed" causes a move tile funtion to make a higher up area accessable.
i would like to make it where once the player pressed the button simply by touching it to look like a pressed button, but once the player is not touching it to switch back to a unpressd button, pop up, pop down, simple to get it to go down but cannot follow through with the button poping back up, can someone help me?
Unfortunately GameDev doesn't allow you to sequence the special functions within a map, but if you can get the function that's on the button to be earlier in the list than another function which extends beyond the button by one tile in every direction (by placing it after the one on the button) then you might be able to do something like this. Have the small function (that covers only the button) cause the button to appear in pressed state and activate constantly (not just on initial touch). Have the larger function copy a piece of the map that makes the button unpressed again. It also should activate constantly. Now when you're touching both functions (near the button) it will copy the unpressed button first, and then the pressed button so when you see the painted screen, it will appear pressed. As you walk away, only the larger function will be activating which will cause the button to appear unpressed.
Another option is to just put some special functions farther away from the button that un-press it, and make sure that the player can never activate the press and un-press functions at the same time.
Another idea (in your case) is to just use a springboard instea of a button. The springboard can catapult the player to an area higher than is normally accessible. A springboard can be implemented with a special function that switches the player to a vector sprite with a high max velocity on a path that goes upward. Near the top of the sprite's jump you can have another special function that switches him back to a regular player sprite, retaining the original velocity.