Hold Shift to Run

Started by G_G, August 13, 2008, 04:47:34 pm

Previous topic - Next topic

G_G

Ok this was an easy tutorial and thoughtI'd share it. On the Map or in Common events make the event parallel and enter this

Loop
Label 1
Wait 1 Frame
Branch if A Button is Held
Branch if Var[xxxx:Run] = 0
   Move Event Player:Set Speed 5
   VarOper:[xxxx:Run] set = 0
   Jump to Label 1
  Else
   Jump to Label 1
End
Else
Branch if Var[xxxx:Run] = 1
   Move Event Player:Set Speed 4
   VarOper[xxxx:Run] set = 0
   Jump to Label 1
Else
   Jump to Label 1
End
End

I don't know if alot of you know this but I decided to post anyways as my first post! :)

DeathLock

This isn't much of a tutorial, if you just post a the event code instead of instructions.

But, its too simple. Oh well, welcome to forum.


Blizzard

Nice. But I suggest that you avoid using the loop command in a parallel process since parallel process already gets executed over and over. This code would work better. :)

Branch if A Button is Held
  Move Event Player:Set Speed 5
Else
  Move Event Player:Set Speed 4
End


Of course this should be disabled when making cutscenes where the player speed is changed.
Check out Daygames and our games:

King of Booze 2      King of Booze: Never Ever
Drinking Game for Android      Never have I ever for Android
Drinking Game for iOS      Never have I ever for iOS


Quote from: winkioI do not speak to bricks, either as individuals or in wall form.

Quote from: Barney StinsonWhen I get sad, I stop being sad and be awesome instead. True story.

G_G

I guess you're right and thank you. I will start posting some detailed instructions and what each command does next time.

Sally

Quote from: Blizzard on August 13, 2008, 05:05:42 pm
Of course this should be disabled when making cutscenes where the player speed is changed.


just put that code in common events and during cutscenes take the switch off. then put it back on after :P

Blizzard

That was what I meant. ^_^
Check out Daygames and our games:

King of Booze 2      King of Booze: Never Ever
Drinking Game for Android      Never have I ever for Android
Drinking Game for iOS      Never have I ever for iOS


Quote from: winkioI do not speak to bricks, either as individuals or in wall form.

Quote from: Barney StinsonWhen I get sad, I stop being sad and be awesome instead. True story.

Sally