I would like to know of a way to make your character run when you press a button. I would prefer run toggling rather than holding. I HAVE searched to see if it is on this forum, or any other, and I have found nowt.
If anyone could help, please?
Theres a dash script somewhere, but you'd need running sprites. Also this can easily be done with events.... make a common event...
Make a switch called Dash
Make a conditional branch to check if the switch Dash is on.
If it is... Make it...
When button [A] is pressed walking speed = 4
Turn Switch [Dash] off.
Else
When Button [A] is pressed walking speed = 5
Turn Switch [Dash] on.
Use this.
[code]if Input.trigger?(Input::L)
Thanks. But wait... I don't understand. Could you explain again please? I also forgot to say I'm using RPG maker XP. :oops:
Okay, here:
red - scripts button, press it to open the scripts window
green - the script names, find Gaem_Character2 as I did.
cyan - find def update and paste the code below in
blue - just like I did (mine differs from yours, bcoz I use mine only for debug)
Just paste the code I posted in my post above there, where the code on this screenshot is.
(https://rmrk.net/proxy.php?request=http%3A%2F%2Fimg449.imageshack.us%2Fimg449%2F529%2Fsnap387bx.png&hash=e6d9b4792f51631df7b0ed0a295cb47138ce5cd1)
im using this code also :), but im wondering is there a way to make it last for like 3 second and then you have to wait like 10 seconds before you can use it again?
It
:mrgreen: Awww yeah. It works! thanks. Just one more thing... is there a way of making it so tha this only works after a switch has been turned on? Then, I'm done. Thanks!
Sure. Use one of the game switches. Just replace the old code i gave you with this one. Replace the XXXX with the ID number of the in game switch you want to use. Now, turning on the switch will allow dash.
[code]if $game_switches[XXXX] == true
Aargh no! I put this in, but now when I trigger the switch ON nothing happens. :-( (the switch ID is 0061 I think)
EDIT: also I forgot to ask if you could switch to a new set of sprites when you begin to run. this is because the idea is you hit a switch, you gain the ability to turn into a monster and run dead fast. You press the change into button, and you turn into the monster and can run quickly. you press it again and you change back.
Then it
OK thanks, I think I've got it cracked now... I hadn't realised how you could change your own speed using events... DUH. I will report back my success. Thanks all!
UPDATE: Yep, I got it all working now. It's kind of a strange way to do it, but you 'activate' run mode by using an item. this toggles run mode on/off. It may sound clumsy, but it works well in practice.