Charas-Project
Game Creation => Requests => RPG Maker Programming => Topic started by: Desimodontidae on June 28, 2007, 12:34:16 AM
-
I'm making a Legacy of Goku-type ABS. I want it to be like, you hold down Z for a certain amount of time, and how long you hold it down determines your beam's power when you let go. However, I have no idea how to do that.
Right now, what I have is you hit "Shift" to start charging and you'll stay in a charged state for 2 seconds. In that 2 seconds, you can hit "Shift" as many times as you want (max of 3 so far) to determine how powerful your attack will be when you're done charging (or hit Z or X to cancel out).
Is there any way to do the hold down thingy? And if not does anyone have a better idea? Cause the shift thing's kinda gay.
-
The best thing I can think of is to use a Loop that adds 1 to a variable every .1 seconds as long as the key is held down (see attachment). Then, using branches to check what the second variable is, you could determine the power of the attack.
-
Also, don't forget to initialize 'b' as 0.
Even more so, I would recommend labels instead of loops.
-
I did this once, in a zelda-game, I'd highly recommend labels above loops.
it did work, however it made my game quite laggy ('cause Link was flashing like mad)
-
Originally posted by Warxe_PhoenixBlade
The best thing I can think of is to use a Loop that adds 1 to a variable every .1 seconds as long as the key is held down (see attachment). Then, using branches to check what the second variable is, you could determine the power of the attack.
Not working. For some reason once you hit the button the variable doesn't stop rising. I'll work with it some more, but yeah... if you can help anymore, ya know, that'd be cool..