Main Menu
  • Welcome to The RPG Maker Resource Kit.

Pong Minigame

Started by D&P3, May 27, 2012, 06:16:28 PM

0 Members and 1 Guest are viewing this topic.

DoctorTodd

Couldn't you change this line
if Input.trigger?(Input::B)                   
        if Pong_Options::Access_Menu == true

to this?
if Input.trigger?(Input::B) && Pong_Options::Access_Menu == true
I'm pretty sure you can do something like that in RGSS 3. There's nothing wrong with the way you wrote it but it just seems cleaner.  :)

Little Psycho

Quote from: D&P3 on July 10, 2012, 06:52:21 PM
If you actually create a variable called 'Matches' in the module (editable region) and set it to equal an integer number (a whole number like 1, 2, 6, 132; decimal point numbers like 2.0, 3.14, 82.5256 are called floats instead of an integers) then yes, that will work just fine.

YAAAAAAAAY, thank you D&P3!!! You are helping me to learn RGSS on my own!!!!!!!!!!!

If I knew how to + you, I would!



As blonde as can be!!!
Doesn't mean I'm the dumb one...
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

[Spoiler=supporting!]
[/spoiler]


D&P3

Quote from: DoctorTodd on July 10, 2012, 07:03:04 PM
Couldn't you change this line
if Input.trigger?(Input::B)                   
        if Pong_Options::Access_Menu == true

to this?
if Input.trigger?(Input::B) && Pong_Options::Access_Menu == true
I'm pretty sure you can do something like that in RGSS 3. There's nothing wrong with the way you wrote it but it just seems cleaner.  :)
Yes but then I would of had to have done

if Input.trigger?(Input::B) && Pong_Options::Access_Menu == true
#do stuff
elsif Input.trigger?(Input::B) && Pong_Options::Access_Menu == false
#do stuff
end


Which means that I am checking four things.
Whereas
if Input.trigger?(Input::B)                   
        if Pong_Options::Access_Menu == true
          open_command_window   
        else
          $scene = Scene_Map.new
        end
      end

Means that I'm only checking one thing and not checking anything else unless that one thing is true.

Quote from: Amycha19 on July 10, 2012, 07:49:57 PM
YAAAAAAAAY, thank you D&P3!!! You are helping me to learn RGSS on my own!!!!!!!!!!!

If I knew how to + you, I would!
You're most welcome :)
All of my scripts are totally free to use for commercial use. You don't need to ask me for permission. I'm too lazy to update every single script post I ever made with this addendum. So ignore whatever "rule" I posted there. :)

All scripts can be found at: https://pastebin.com/u/diamondandplatinum3

amerk

A bit out of date, but hell why not? Awesome job with this so far, D&P3. I'm just trying to figure something out.

In my game, this should be a one-time occurrence. Basically one of the villains will challenge you to a game of pong; and if you win you move on, but if you lose it's game over.

So basically I have my event take place, a game of pong commences, and then the outcome of that game will determine what happens next. I've disabled access to the menu, set my BGM, images sizes, points to win, and what not. Everything works smoothly until the final point is scored. Then it just sits there waiting for the player to either hit the "escape" key to leave or the "enter" key to play again.

Is there a way to automatically dispose of this window and return to my event once the game has been won or lost?

Thanks again!

D&P3

I believe if you replace this:

Code (line 2919) Select

if @gameover == true
        if Input.trigger?(Input::C)
          process_pong_reset
        end
      end


with this:

if @gameover == true
       $scene = Scene_Map.new
      end


it should work.

This code is very old though, so I don't remember if I had provided a way to test who won a match.
All of my scripts are totally free to use for commercial use. You don't need to ask me for permission. I'm too lazy to update every single script post I ever made with this addendum. So ignore whatever "rule" I posted there. :)

All scripts can be found at: https://pastebin.com/u/diamondandplatinum3

amerk

No problems, I'll give it a whirl and see if it works. Thanks for your help!

EvilM00s

Nice stuff here, D&P3. It's in the new game.
:tinysmile: