Home
Help
Search
Calendar
Login
Register
Please
login
or
register
.
1 Hour
1 Day
1 Week
1 Month
Forever
Login with username, password and session length
News:
New forum theme up and running!
Charas-Project
»
Game Creation
»
Requests
»
RPG Maker Programming
»
Walking/Charging
« previous
next »
Print
Pages: [
1
]
Author
Topic: Walking/Charging (Read 1997 times)
Hoshimo
Level 1 Newbie
Initiate
Posts: 12
Walking/Charging
«
on:
May 04, 2008, 07:53:46 PM »
I'm trying to put a walking sound effect and have charge attacks in my game, but I can't find anything that stores how long a keyboard button is pressed.
I assumed I could use "Store Amount of Time Taken to Press Key" but it's all falling to pieces, since every code i'm trying isn't working very well. Any advice or codes for this sort of thing?
Logged
Dominicy
All men play on ten!
Leader
Posts: 2,852
(No subject)
«
Reply #1 on:
May 04, 2008, 08:14:33 PM »
MeIsCool's game (Metal Tears) had a system like that. If you can hunt down a working download you MIGHT be able to look through the game and find the code for it.
As to the walking sound effect, in the database, go to the terrain tab. choose the first one (or whatever terrain you have your chipsets assigned to) and change the 'sound effect' option to the sound effect you want.
Logged
Hoshimo
Level 1 Newbie
Initiate
Posts: 12
(No subject)
«
Reply #2 on:
May 04, 2008, 09:36:58 PM »
I didn't realise the default system had that, since I never really looked around at the defaults, also, I did look around for Metal Tears and I gotta say WOW that's alot of code, so thanks a bunch for the help.
Logged
DragonBlaze
A Wild DB Appeared!
Royal
Posts: 3,329
(No subject)
«
Reply #3 on:
May 06, 2008, 03:18:59 PM »
Charging is pretty easy. Make a parallel process event with a key input. After the key input, have an if statement for if the key is pressed. If the key is pressed, wait 1 second, and then add 1 to a variable (lets call it [charge]. In the else condition of the if statement, set [charge] equal to 0.
It should look something like this.
Key input process
IF key pressed
- wait .1
- [charge] + 1
ELSE
- [charge] = 0
The longer you press the key, the higher the [charge] variable gets. When you let the key go, the variable goes back to 0.
Logged
Hell Yeah! Just recovered all my old rm2k/3 games from my 10 year old, broken laptop hard drive that had been formatted and had a new OS installed on it. Oh, and I did all of this from my phone. WIN
Print
Pages: [
1
]
« previous
next »
Charas-Project
»
Game Creation
»
Requests
»
RPG Maker Programming
»
Walking/Charging