Hey I am new here, so hello first, now onto my question. I use RMXP and Im wondering if somehow, someway, you can create those events where something flashes up on the screen telling you to press a certain button and if you dont press it in a certain amount of time you die or get hurt. If youve ever played something like God of War you know what I mean. So yeah is there anyway to do this, maybe a script? Thanks
Actually, you can do this fairly easily all with events. Show a picture of what the player needs to do with the show picture command. Then, do a loop. In this loop, have a conditional branch for if the button you want them to press is being pressed or not. If it is being pressed, break the loop, erase the picture, and do whatever happens next. If not (in the else section), have a new variable named Timer or something get 1 added to it. After that variable, have a conditional branch check if that variable equals however long it takes for the player to fail the event. You'll need to experiment for how long that number is. Anyways, in that conditional branch, have then what will happen if the player fails, erase the picture, and break the loop.
Ex:
-Show Picture
-Loop
-Conditional Branch: If X is being pressed
-Show Text: Tada!
-Erase Picture
-Control Variable: Timer = 0
-Break Loop
-Else
-Control Variable: Timer + 1
-Conditional Branch: If Timer is equal to or more than 100
-Show Text: You failed!
-Erase Picture
-Control Variable: Timer = 0
-Break Loop
-End Branch
-End Branch
-Repeat Above
That should work, though I've not tested it myself yet.
Dammit, Zylos beat me to it -.-
But before you control the variable called timer, make a wait command of one frame. Then make your variable around 60 for 1 second, 120 for 2 seconds, etc. I tried doing it without the wait command, and the computer just looped through too fast.
And I use labels, not loops. But whatever works.
It didnt work. Or perhaps i did it wrong. Anway heres the event:
(https://rmrk.net/proxy.php?request=http%3A%2F%2Fi235.photobucket.com%2Falbums%2Fee162%2FMegamanBeastOutBass%2FSettings.jpg&hash=00d7fff0c09767d818104e9b9a5fcee3cbc3f1c5)
Does it play the animation there after a short amount of time? It won't play the victory thing because you've got it breaking the loop before it's erased the picture or saying IWON.
I just switched the break loop thing to after the picture erase and IWON but it still doesnt work. It doesnt even show the picture and i know ive got the coordinates right. I think this is more complex than it may seem
If it's not showing the picture, it means the event likely isn't even activated yet. Set it to parallel process, with an erase event command afterward for right now just to test it.
Just set to Parallel process and added Erase Event at the end...this time the sprite didnt even appear and nothing happened except for the animation noise being heard
Then it's actually going way too fast. Add in the wait command like Cozziekuns said, right before the adding 1 to your variable.
Ok now its actually showing the picture and giving me time but still no matter how many times i press A it just ends up with me getting hit
Quote from: DylansGamez on May 01, 2010, 02:00:28 AM
Ok now its actually showing the picture and giving me time but still no matter how many times i press A it just ends up with me getting hit
I'm assuming your pressing the "A" button on the keyboard, no?
For XP:
SPACE, ENTER, or C is C
Esc, Ins, or X is B
Shift or Z is A
V, Q or Page Up is L
B, W or Page Down is R
A is X
S is Y
D is Z
So you need to be pressing Shift or Z.
Heh. it worked. Its finally done. Thanks for helping me with this Zylos and Cozziekuns. Musch appreciated :)
(https://rmrk.net/proxy.php?request=http%3A%2F%2Fi254.photobucket.com%2Falbums%2Fhh99%2FZylos_2007%2FSmilies%2Fzylos_closedgrin.gif&hash=93dc5cce5363bfb4a9dbad97cc18e2d5b12318fb)
Glad you got what you needed. Mind editing your topic title to have [Resolved] added to it now?
Glad I could help, though it was mostly Zylos.