Ok, im making a game where you get chased by a guy, but i dont want unlimited dash, i want the player to go for like 5 seconds, then walk for 4. is there any way of doing that?
How to disable dash for a bit, then turn it back on
RGSS3 Script RequestsThis would need either a script or a very complicated Parallel Process.
Sadly my scripting abilities don't stretch that far.
Sadly my scripting abilities don't stretch that far.
That's fine, thanks anyway, I just downloaded a script that has a dash meter on it, I'm just making sure it work
Oh and by the way I'm in the middle of making a game on rpg maker, check out the demo on game jolt, it's called Fun House 🙂
You could try this: Dashing could be disabled/enabled simply using switch.
You could setup an event that would turn ON/OFF that switch after some time or something.
I wrote this snippet some time ago, I hope I didn't break anything.
# This snippet overwrites 'disable_dash?' method.# To disable dash, simply turn switch ON.DASH_SWITCH = 10 # Switch, that needs to be turn ON to disable dash.#===[ Do not touch, unless you know, what you're doing. =) ]====================class Game_Map def disable_dash? if $game_switches[DASH_SWITCH] == true true else false end # if end # defend # class
Aw balls my grammar etc.
You could setup an event that would turn ON/OFF that switch after some time or something.
I wrote this snippet some time ago, I hope I didn't break anything.
# This snippet overwrites 'disable_dash?' method.# To disable dash, simply turn switch ON.DASH_SWITCH = 10 # Switch, that needs to be turn ON to disable dash.#===[ Do not touch, unless you know, what you're doing. =) ]====================class Game_Map def disable_dash? if $game_switches[DASH_SWITCH] == true true else false end # if end # defend # class
Aw balls my grammar etc.
Couldn't you do that with conditional branches and variables? Guess not. lel
Ok thanks for the script 🙂
First check if it works fine for you. xD
It kinda works. I just need to tweak the number, will that say how much dash time? Or how much walking time?
BobTheBlob, please avoid double posting, as it is against the forum rules. You can review our forum rules here. Thank you.
I've moved this thread to RGSS3 Script Requests. Please be sure to post your threads in the correct forum next time. Thank you.
This is just a slightly more efficient version of the above:
It would not show how much dash time or how much walking time. You did not ask to be able to do that. If you needed it, you should have included it in the original description. If you do need it, you should now explain what you mean. Where do you want it to show? How is it to be determined? You control that switch, so you control how much time there is. You could use a simple timer function that turns on the switch and starts the timer, then turns off the switch and stops the timer after it's counted down to 0.
I've moved this thread to RGSS3 Script Requests. Please be sure to post your threads in the correct forum next time. Thank you.
This is just a slightly more efficient version of the above:
Code:
# This snippet overwrites 'disable_dash?' method.# To disable dash, simply turn switch ON.DASH_SWITCH = 10 # Switch, that needs to be turn ON to disable dash.#===[ Do not touch, unless you know, what you're doing. =) ]====================class Game_Map def disable_dash? $game_switches[DASH_SWITCH] end # defend # class
I was saying what the number meant, dash time or walk time?
It doesn't mean a time. It means a switch (hence the name DASH_SWITCH). Choose a switch to use when you want to disable dashing. Change that number to the number of the switch. When you want to disable dashing, turn on that switch. When you want to enable it again, turn off the switch.
Ohhhhhh, thanks for ur help, I've got it now 🙂
1. You got double 'blue text' good job! Impressive! ( ͡° ͜ʖ ͡°)
2. Shaz ~ Improvement of that snippet - nice, I didn't thought about it.
3. Yes, the number represents the switchnumber in your game. It only DISABLES or ENABLES dashing.
Just use event to turn that switch ON/OFF to enable/disable dashing. As Shaz suggested, you can use a timer for that, or a variable connected with switch... or something like this...
4. NOTE: 'Disable Dashing' in map properties will not work anymore - it is replaced by that switch.
2. Shaz ~ Improvement of that snippet - nice, I didn't thought about it.
3. Yes, the number represents the switch
Just use event to turn that switch ON/OFF to enable/disable dashing. As Shaz suggested, you can use a timer for that, or a variable connected with switch... or something like this...
4. NOTE: 'Disable Dashing' in map properties will not work anymore - it is replaced by that switch.
Use alias instead 🙂
Code:
# This snippet overwrites 'disable_dash?' method.# To disable dash, simply turn switch ON. DASH_SWITCH = 10 # Switch, that needs to be turn ON to disable dash. #===[ Do not touch, unless you know, what you're doing. =) ]====================class Game_Map alias switch_disable_dash disable_dash def disable_dash? switch_disable_dash or $game_switches[DASH_SWITCH] end # defend # class
Original thread: https://forums.rpgmakerweb.com/threads/how-to-disable-dash-for-a-bit-then-turn-it-back-on.43531/