Help - Search - Members - Calendar
Full Version: [SSS] Mini Game: Bull's Eye
RPG RPG Revolution Forums > Scripting > Script Tutorials > RGSS2
Shanghai
Shanghai Simple Script - Mini Game: Bull's Eye
made by Shanghai



Link/Script
Click here
NR Since the pockethouse link above does not work, I've re uploaded the script
Click to view attachment and the necessary graphics, which need to be placed in the Gaphics >> System folder
Click to view attachment

Introduction
Shoot at a little target in the center.

How to Use
Download this image into the System folder.


Do a script call for
CODE
$game_variables[1] = bulls_eye_game(x, y)


x is the percentage range allowed for error and y is the cursor speed. Works with Battle Engine Melody. Also, view the demo to see it in action.

The script is activated via the use of a script call - via "Script" in events or as part of your own scripting in RGSS2. You enter your own values into the script, just like Shanghai's instructions, using a variable of your choice in $game_variables[] that you want to use to handle results, and the (x,y) part of the code affects how precise the player has to be (x is the percentage of the bar that the player has to get "Perfect", .y is the cursor speed)

When you do the script call, it will automatically run the bullseye minigame for you. Upon its completion (By the player hitting a button), the variable you set will be changed based on the results. In case of a Perfect, the variable will be set to 2; in case of an Almost, it is set to 1; and in case of a Miss, it is set to 0.

You can then use that variable however you want to do whatever you want with the results.

Compatibility
- Compatible with Battle Engine Melody.

For more Shanghai Simple Scripts
Visit Here.
Guyver's Bane
Back to back! This is awesome. There really arent many mini-game scripts out there. Any chance the next script will blow our minds?
ASCIIgod
nice script shanghai. errrrrr..... what does that do? or perhaps i should say what can it do when used with melody? or without melody?
Shanghai
There's a demo you can try out.
archeart
ohhhhhh this is awesome :3

Though I had something like this in mind but a bit different :3 rather that in battle I was thinking of a sort of hunting script where you need to hunt deer or something tongue.gif

tell me if you think that's possible :3
ASCIIgod
awesume shanghai. did you know that your cool script shanghai is also good on tankentai? with my expert ability at making custom skills with tankentai and with your briliiant script i can make it work. also thanks for the script.
Twilight27
Hey, is it possible for you to make this mini game without using the battle system? As in... on the field, you interact with a character/item and start up the mini-game and you'll be awarded accordingly depending on your hit score.

I think I understand that'll be a bit troublesome to do that without the battle system, so it's ok if you can't, but just wondering.
Shanghai
RTFM.
Twilight27
QUOTE (Shanghai @ May 27 2010, 01:56 AM) *
RTFM.


I'm assuming that was a reply to me, so um... sorry? I'm not familiar with what that means =/
ASCIIgod
QUOTE (Twilight27 @ May 29 2010, 11:38 AM) *
QUOTE (Shanghai @ May 27 2010, 01:56 AM) *
RTFM.


I'm assuming that was a reply to me, so um... sorry? I'm not familiar with what that means =/


hate to be mean but i will. your a dork pal. that system can be use without ANY battle system AT all. that means. it is a stand-alone. you can use it to all script. to make use of the bulls eye mini-game on map. comy the code on the demo to find out how. sorry but hate to spoil things up
Kread-EX
QUOTE (Twilight27 @ May 29 2010, 04:38 AM) *
QUOTE (Shanghai @ May 27 2010, 01:56 AM) *
RTFM.


I'm assuming that was a reply to me, so um... sorry? I'm not familiar with what that means =/

RTFM simply means Read The Fu**ing Manual. In other words, most of questions you might want to ask are already answered if you take the time to read the instructions.
Garlyle
QUOTE (Twilight27 @ May 28 2010, 07:38 PM) *
QUOTE (Shanghai @ May 27 2010, 01:56 AM) *
RTFM.


I'm assuming that was a reply to me, so um... sorry? I'm not familiar with what that means =/
It means never ask Shanghai for help.

Since Shanghai's instructions even on the script itself are incomplete, here's the full details of this script.



The script is activated via the use of a script call - via "Script" in events or as part of your own scripting in RGSS2. You enter your own values into the script, just like Shanghai's instructions, using a variable of your choice in $game_variables[] that you want to use to handle results, and the (x,y) part of the code affects how precise the player has to be (x is the percentage of the bar that the player has to get "Perfect", .y is the cursor speed)

When you do the script call, it will automatically run the bullseye minigame for you. Upon its completion (By the player hitting a button), the variable you set will be changed based on the results. In case of a Perfect, the variable will be set to 2; in case of an Almost, it is set to 1; and in case of a Miss, it is set to 0.

You can then use that variable however you want to do whatever you want with the results.




Also, I don't know if this is actually explained in the demo, but Shanghai, your instructions don't actually cover what happens after you make the script call - namely what the variable ends up set to which is kind of important. I would have figured, personally, that it would have been set to the error margin by which the player missed the mark. I had to look into your code to actually figure out what it's doing afterwards, and that's not good. And I have to do that with all of your minigame scripts.
Shanghai
+1 for you then. You learned something new today. That's in your favor.
leongon
Requires: Being a scripter too.
Garlyle
QUOTE (Shanghai @ May 30 2010, 07:58 AM) *
+1 for you then. You learned something new today. That's in your favor.
Wait.

That's your response? Seriously?

Someone actually points out that you're kind of leaving out a rather crucial bit of information about the use of your script and that's how you respond?

QUOTE
equires: Being a scripter too.

I'm sorry, but for something that really is so simple to use and include like this, which honestly could be a starting place for someone to actually learn how to make use of and implement scripts, and eventually understand enough to create their own... this is a horrible attitude.
Shanghai
QUOTE (Garlyle @ May 30 2010, 07:22 AM) *
QUOTE (Shanghai @ May 30 2010, 07:58 AM) *
+1 for you then. You learned something new today. That's in your favor.
Wait.

That's your response? Seriously?

Don't get me wrong. I'm thankful for your patience to explain the script. I'm also content you've learned something through looking at the script.
Garlyle
QUOTE (Shanghai @ May 30 2010, 08:26 AM) *
QUOTE (Garlyle @ May 30 2010, 07:22 AM) *
QUOTE (Shanghai @ May 30 2010, 07:58 AM) *
+1 for you then. You learned something new today. That's in your favor.
Wait.

That's your response? Seriously?

Don't get me wrong. I'm thankful for your patience to explain the script. I'm also content you've learned something through looking at the script.

Except I didn't because I already knew what I was looking for. I am not the person who needed help nor needed to learn something from this.

Shanghai, your scripts are wonderful for the fact that they are indeed tiny and simple and completely functional. They could, in theory, serve as excellent tools to actually be a launching point for people to come to understand scripting and learn these things on their own.

Your attitude, however, is completely against this. Instead of actually taking the time to explain things in a way that people could actually improve, you really don't even try to give out a hand. You're not actually interested in helping people to improve or even try to learn - you create these things, and they hey, if someone doesn't get it they don't get it and so be it. If you're going to claim otherwise you could do with actually acting it.
Shanghai
Thanks for the complements, but one of my biggest weaknesses (and yes, I'll even admit it) is that I'm terrible at explaining how to make things work without someone else's instructions. That's why I try to include demos for things I find difficult to explain to at least give them an example to work on. This is not an excuse to cover up my weakness by the way.
Garlyle
Well, alright. I can understand it to an extent - I know Yanfly eventually ended scripting publically for a time due to a constant stream of "HOW DO I DO THIS?", and ultimately that's what I don't want to see happen to anyone, and why I push for scripters to provide as much information as possible right there in their scripts. While I know it's tempting to provide only the absolute bare-bones that an experienced scripter would need to know to function the script, if everyone started doing it... well, yeah, it would only serve to widen the gap between those who Know and those who Don't Know.

And I suppose, ultimately, if I have time to complain here that you won't be that step between Nothing and Something, that I should probably aim to do so myself. ...Hmm.
Shanghai
Here's a proposal then. If you can help me write out some instructions, I'll be willing to make something for you (if you even consider my small scripts to be good at all). And since those will need some more instructions, the cycle will continue. Both of us profit.
Garlyle
QUOTE (Shanghai @ May 30 2010, 08:41 AM) *
Here's a proposal then. If you can help me write out some instructions, I'll be willing to make something for you (if you even consider my small scripts to be good at all). And since those will need some more instructions, the cycle will continue. Both of us profit.

While I can hardly say that there's much I need, I don't terribly mind doing this. Ultimately I'm not worried about getting something for myself, but helping others out - saving you a bit of trouble, I suppose, and also helping people come to understand that scripting isn't as ridiculously impossible as it sounds.
Haha, maybe I'll make it a tutorial series~ :3

...With that said, I'll have to start once I've actually had some sleep, because at the moment I'm running on far less than I should be and need to be awake far sooner than I'd like.
Shanghai
Much appreciated then.
leongon
I see Shanghai included your guide on the script usage in the first post. That's fine now for the people that can't understand how scripts works.

Everybody is happy now.
Twilight27
Thank you ASCII, Kread and Garlyle for the help. And sorry Shangai. For the past days I haven't been able to use my own pc and couldn't download and try out your scripts. So I was only able to know so much from this topic. Sorry for my inconvenience. I suppose my other reply in your next topic can lead to another problem seeing I didn't download the demo yet =/

And thanks a lot again, Garlyle, for the explanation. Yup, I know what to do from there.
Fonstw
You gave me a new class biggrin.gif
This is a "lo-fi" version of our main content. To view the full version with more information, formatting and images, please click here.
Invision Power Board © 2001-2013 Invision Power Services, Inc.