Drop through a platform by tapping button once, instead of having to hold it down for a second.
timdmcc788
Member, BASIC Posts: 8
in Tech Support
I can't figure out how to do this..
Comments
It sounds like you already know how to do it by holding down for one second? If so, how are you doing it that way - can you should us your logic?
The basic way to do this would be to have a collide behaviour inside a rule, and tapping the button changes the condition of the rule to become false, preventing the collide behaviour from running.
Contact me for custom work - Expert GS developer with 15 years of GS experience - Skype: armelline.support
^this allows me to jump through from below and drop down from a platform, but I have to hold the key down for longer than I want to in order to drop down. Otherwise, he'll start to drop down, and if you let go he'll snap back up. (i'm guessing it's because it has to wait until the center of the hero's actor meets up with the center of the platform until it's technically fully below, in which case you can unpress the down key and gravity will take over)
I have an idea that might work, but I'm fairly new to GS so I don't know how to execute it.
If you could make it to where you press (not hold) the down key once, and then it deactives the collision for 1 full second, that would give the actor enough time to fall fully through without having to hold. I'm thinking something with a boolean attribute..
Instead of using a rule where a key is held down, make that rule (above) change the value of an attribute -- say an integer or a boolean -- and then make a separate rule that collides based on the value of that attribute.
New to GameSalad? (FAQs) | Tutorials | Templates | Greenleaf Games | Educator & Certified GameSalad User
yeah it still doesn't work. I made it to where if the attribute = 1, collide w/platform.
then I made it..
if you press the down arrow, it changes attribute to 2.
..but you still have to hold the key down instead of pressing it once to drop through.
I even put a timer on it so it's like For 2 seconds Change Attribute to 2. that didn't work either.
Can you post a screenshot of your rules?
New to GameSalad? (FAQs) | Tutorials | Templates | Greenleaf Games | Educator & Certified GameSalad User
got it. thanks tatiang.