I NEED HELP FINDING A SCRIPT!
Posts
Pages:
1
I really need some help! I'm developing a game, and I want there to be a specific mini-game when the MC casts a spell.
In order to make sure the spell works, as buttons go across a line on the screen, the player will have to hit those buttons when they are in the middle of the box on the line. I have found no scripts with this, I found some that were very close, but... They were either too hard to do, too sensitive to error, or I couldn't specify the controls/the difficulty.
Please help. If you know of a script that may work, I'd love a link! If you think you might be able to do a little quick work, and make the script for me, I'd be really grateful! I'd feature you in the game as an easter egg, if you liked.
In order to make sure the spell works, as buttons go across a line on the screen, the player will have to hit those buttons when they are in the middle of the box on the line. I have found no scripts with this, I found some that were very close, but... They were either too hard to do, too sensitive to error, or I couldn't specify the controls/the difficulty.
Please help. If you know of a script that may work, I'd love a link! If you think you might be able to do a little quick work, and make the script for me, I'd be really grateful! I'd feature you in the game as an easter egg, if you liked.
You don't need a script for this. First, you need to create the button press graphics. I would draw the individual buttons, then the button line, and then program my event so that the buttons moved along the line. You need three button graphics:
1. Regular button
2. Pressed button (good)
3. Pressed button (fail)
And your barline graphic
Also, event coding-wise, you may find it easier to do all of the buttons and the barline as a single static graphic, but this would need hundreds of pictures of each button at each position, plus the successful button presses versus the failed ones.
For each sequence in which you're player isn't supposed to press anything, you need to do the following:
Show picture: 1, 'Barline', Upper Left (0,0)
Show picture: 2, "Regular Button" Upper left (Wherever you end up placing it)
Wait: 30 Frames (or your preference...this actually moves pretty quickly, so you may want it to go slower...maybe 45 frames or a full 60 frames.)
Move Picture: 2, "Regular Button" Upper Left (Slightly to the right)
Conditional branch: The (whatever button you want pressed) button is being pressed.
Erase picture: 1
Show picture: 3, Pressed button (fail), Upper left (...,...)
And the rest of this, do whatever stuff you want to happen.
Branch end
Repeat this process for however long you want any button presses to fail.
Next, for a successful button press, you want to follow the same procedure, except, you want to put it in a loop.
Loop
Conditional branch: button pressing and stuff.
Use good pics instead of bad pics.
It worked this time.
Repeat Above
Break loop
What you are basically doing is defining the fail condition as the normal condition. In order to define a successful button press, you place it in a loop. Anyway, this is exactly how to do what you are asking for. It's tedious and time consuming, but it is worth it. I wouldn't risk using a script that could break a part of the game when you can just use events.
Gunfight! Here's a minigame I made for the RMN 8 Birthday event that uses this exact procedure to create a gauge to create a successful scenario where pressing the A button at the wrong time or not pressing it at all results in losing a gunfight, and pressing at a certain time wounds opponent, winning the fight, or kills him outright. The event in question is on MAP005 at 003,007. Feel free to appropriate the event as you see fit.
1. Regular button
2. Pressed button (good)
3. Pressed button (fail)
And your barline graphic
Also, event coding-wise, you may find it easier to do all of the buttons and the barline as a single static graphic, but this would need hundreds of pictures of each button at each position, plus the successful button presses versus the failed ones.
For each sequence in which you're player isn't supposed to press anything, you need to do the following:
Show picture: 1, 'Barline', Upper Left (0,0)
Show picture: 2, "Regular Button" Upper left (Wherever you end up placing it)
Wait: 30 Frames (or your preference...this actually moves pretty quickly, so you may want it to go slower...maybe 45 frames or a full 60 frames.)
Move Picture: 2, "Regular Button" Upper Left (Slightly to the right)
Conditional branch: The (whatever button you want pressed) button is being pressed.
Erase picture: 1
Show picture: 3, Pressed button (fail), Upper left (...,...)
And the rest of this, do whatever stuff you want to happen.
Branch end
Repeat this process for however long you want any button presses to fail.
Next, for a successful button press, you want to follow the same procedure, except, you want to put it in a loop.
Loop
Conditional branch: button pressing and stuff.
Use good pics instead of bad pics.
It worked this time.
Repeat Above
Break loop
What you are basically doing is defining the fail condition as the normal condition. In order to define a successful button press, you place it in a loop. Anyway, this is exactly how to do what you are asking for. It's tedious and time consuming, but it is worth it. I wouldn't risk using a script that could break a part of the game when you can just use events.
Gunfight! Here's a minigame I made for the RMN 8 Birthday event that uses this exact procedure to create a gauge to create a successful scenario where pressing the A button at the wrong time or not pressing it at all results in losing a gunfight, and pressing at a certain time wounds opponent, winning the fight, or kills him outright. The event in question is on MAP005 at 003,007. Feel free to appropriate the event as you see fit.
author=pianotm
You don't need a script for this. First, you need to create the button press graphics. I would draw the individual buttons, then the button line, and then program my event so that the buttons moved along the line.
That... wow, that seems very advanced! I dont know if I'd be able to pull that off -- especially if I had to use 100 pictures. I think I'd fry my poor desktop ;u; Thank you so much for taking the time and trying to help me though!
author=kory_toombs
http://galvs-scripts.com/galvs-timed-button-attacks/
Thank you, but I'm not looking for attacks/battles in my game. I appreciate the help though!
Ohhh.... I completely misread this.
You'll need to do what pianotm suggested then.
You need a common event that is a parallel process.
It it triggered by the mini game switch.
Condition branches inside if button is being pressed, etc..
I think the Takentai System has an add-on that needs button mashing... but meh, I'm not sure about that.
It's not so much hard as it is tedious. I had to use a static graphic because it was a dial that changed color as it advanced. You, from you're describing, don't have to. You'll only need four images (or more for each effect you want to do). You can also use the default RTP animations to add effects. For my little dial, I needed 76 images, meaning I needed 76 conditional branches. If I had been able to do it by moving pictures instead of changing them, I only would have needed a handful of conditional branches.
In total, that sequence for that little gauge took me four hours to program. When I started, I had absolutely no idea how to do it. I had never done anything complex, and I had especially never done anything outside of the basic event commands, and by the rules of the event, I only had 8 hours to make the game from start to finish (that's why it's so unpolished). So no, this isn't hard. Of course, if you downloaded and tried Gunfight!, then you know how those 76 images barely went by in a couple seconds. For your button press minigame, you'll probably want your gauge on the screen for at least a few seconds. Using the individual button images makes it easier. You can control the distance and speed that the image floats along it's path.
Here's how it works.
Show picture: 1 'barline' Upperleft(0,0)
What this command does is it shows your barline image, aligning it's top left corner with the top left corner of the screen. So if you have a barline image the width of the screen, 40 pixels tall, with the actual top of the barline 20 pixels from the top of the image, you will have a barline that runs across the screen 20 pixels from the top. Now, let's say your button image is only 10x10, an it is exactly 10x10, taking up the entire image. You can't put it at 0,0, because that will be above the barline. So...
Show picture: 2, 'Button' Upperleft (0,20)
It will start at the leftmost portion of the screen, 20 pixels from the top. It will be right on top of your barline, exactly where you want it. Now, how fast do you want that button to go across the screen? This is easy. If you want it to move halfway across the screen in one second, simply do this:
Move Picture: 2, 'Button' Upperleft (230,20), (100%,100%), 255, normal, @wait 60
Your image will move halfway across the screen at 1 one second, but you might think that's too fast. So, you may want it to cross the screen at 2 seconds. In the Move Picture command box, go to the bottom and change Time to 120 frames. That will slow it down.
Now, this is a little different from the static image. And having only just tested this system now, I realize you can't use the failed button press because there's no way to tell the system where the image will be at the random moment the button gets pressed. So, I'll be playing an animation instead. It'll be easier to put all individual actions on their own event pages; no loops. So, the thing is simple. Make your barline. Make sure it has markers so your player knows exactly when to press the button. Then make the following code (now, I don't know what handlers you're using, so I'm just going to make it fail or succeed).
Now, in this event window, any time you press the shift button (I know it says A. Don't ask me why), the game ends. Now, on to Event page 2. Let's say you need to hit the mark at exactly the right time.
Now, with this, I think you figure this out well enough from here.
I will tell you that while this method is nowhere near as tedious as making the static graphic (lots of pics) the result is nowhere near as clean. To make a nice gauge that works smoothly, you'll need to put the effort into it.
In total, that sequence for that little gauge took me four hours to program. When I started, I had absolutely no idea how to do it. I had never done anything complex, and I had especially never done anything outside of the basic event commands, and by the rules of the event, I only had 8 hours to make the game from start to finish (that's why it's so unpolished). So no, this isn't hard. Of course, if you downloaded and tried Gunfight!, then you know how those 76 images barely went by in a couple seconds. For your button press minigame, you'll probably want your gauge on the screen for at least a few seconds. Using the individual button images makes it easier. You can control the distance and speed that the image floats along it's path.
Here's how it works.
Show picture: 1 'barline' Upperleft(0,0)
What this command does is it shows your barline image, aligning it's top left corner with the top left corner of the screen. So if you have a barline image the width of the screen, 40 pixels tall, with the actual top of the barline 20 pixels from the top of the image, you will have a barline that runs across the screen 20 pixels from the top. Now, let's say your button image is only 10x10, an it is exactly 10x10, taking up the entire image. You can't put it at 0,0, because that will be above the barline. So...
Show picture: 2, 'Button' Upperleft (0,20)
It will start at the leftmost portion of the screen, 20 pixels from the top. It will be right on top of your barline, exactly where you want it. Now, how fast do you want that button to go across the screen? This is easy. If you want it to move halfway across the screen in one second, simply do this:
Move Picture: 2, 'Button' Upperleft (230,20), (100%,100%), 255, normal, @wait 60
Your image will move halfway across the screen at 1 one second, but you might think that's too fast. So, you may want it to cross the screen at 2 seconds. In the Move Picture command box, go to the bottom and change Time to 120 frames. That will slow it down.
Now, this is a little different from the static image. And having only just tested this system now, I realize you can't use the failed button press because there's no way to tell the system where the image will be at the random moment the button gets pressed. So, I'll be playing an animation instead. It'll be easier to put all individual actions on their own event pages; no loops. So, the thing is simple. Make your barline. Make sure it has markers so your player knows exactly when to press the button. Then make the following code (now, I don't know what handlers you're using, so I'm just going to make it fail or succeed).
@>Show picture: 1 'barline' Upperleft(0,0), (100%,100%), 255, normal
@>Show picture: 2, 'Button' Upperleft (0,20), 255, normal
@>Move Picture: 2, 'Button' Upperleft (230,20), (100%,100%), 255, normal, @60, wait
@>Conditional Branch: The Button A is Being Pressed
@>Show Animation: Player, [Hit Physical]
@>Game Over
@>
: Else
@>Control Self Switch A=ON
@>
: Branch End
@>
@>Break Loop
Now, in this event window, any time you press the shift button (I know it says A. Don't ask me why), the game ends. Now, on to Event page 2. Let's say you need to hit the mark at exactly the right time.
@>Move Picture: 2, 'Button' Upperleft (240,20), (100%,100%), 255, normal, @5, wait
@>Conditional Branch: The Button A is Being Pressed
@>Play ME: 'Fanfare3' (100,100)
@>Control Self Switch C=ON
@>
: Else
@>Control Self Switch B=ON
@>
: Branch End
@>
Now, with this, I think you figure this out well enough from here.
I will tell you that while this method is nowhere near as tedious as making the static graphic (lots of pics) the result is nowhere near as clean. To make a nice gauge that works smoothly, you'll need to put the effort into it.
author=pianotm
It's not so much hard as it is tedious. I had to use a static graphic because it was a dial that changed color as it advanced. You, from you're describing, don't have to. You'll only need four images (or more for each effect you want to do). You can also use the default RTP animations to add effects. For my little dial, I needed 76 images, meaning I needed 76 conditional branches. If I had been able to do it by moving pictures instead of changing them, I only would have needed a handful of conditional branches.
Thank you so much for taking even more time to help me out! You've been a great help-- I appreciate it!
author=KatanaHiroshi
I think the Takentai System has an add-on that needs button mashing... but meh, I'm not sure about that.
Nnnnope, I asked for a combo-based system. Thanks anyways.
You are very welcome. Just remember that on this line...
@>Move Picture: 2, 'Button' Upperleft (230,20), (100%,100%), 255, normal, @60, wait
...the numbers at this point........................^^^..................represent your pixel position. You just need to make sure your numbers line up with your markers. You can find out where your markers are on most graphics programs simply by using the pixel grid window. Usually you can roll your mouse pointer over the spot you've placed your marker and it'll tell you what number the pixels are at. If it doesn't, you can also count the pixels.
@>Move Picture: 2, 'Button' Upperleft (230,20), (100%,100%), 255, normal, @60, wait
...the numbers at this point........................^^^..................represent your pixel position. You just need to make sure your numbers line up with your markers. You can find out where your markers are on most graphics programs simply by using the pixel grid window. Usually you can roll your mouse pointer over the spot you've placed your marker and it'll tell you what number the pixels are at. If it doesn't, you can also count the pixels.
Pages:
1















