Easy to change to fit many different minigames. Examples inside.
Runs on a difficulty system to determine how it plays.
Uses button presses to add interaction.
Few steps to import. Just follow the directions.
Some knowledge of eventing, such as variables, is required.
Only requires you to make 1 variable: Difficulty.
Use an optional variable for Lumberjack: Trees Slain.
I made this system using Events and Pseudo-Scripting. The pseudo-scripting makes it as easy as possible to copy and paste the events into your map. It also simplifies the eventing.
Right now it's set-up to be a lumberjack and boulder maze mini-game, but it can also be mining or monster fighting.
There are plenty of minigames for mining or lumberjacks. But there are none as dynamic as this, as simple to copy and paste, and as aesthetically complete.
My use of what is known in programming as Global Variables is a bit unorthodox and unprofessional. It is, indeed, considered bad coding. However, it should be harmless, and will not interfere with any scripts you have set up.
The system only requires minor changes to put into your game. Follow the directions and you'll be in business. It's set up in my own game I'm working on, Herocraft, but I wanted to share it with the community so we can all see higher quality gameplay.
KNOWN BUGS:
None.
FAQ and Trouble Shooting
Q: I put this into my map but I can't see any of the events/when I touch the event I don't see anything. A: Try importing all the required pictures (and for lumberjacking, charsets) into your map.
Q: I pasted the events into my map, but when I touch them they don't respond. A: You probably copy and pasted them in a bad order. Remember, you must copy-paste one object, followed immediately by an interpreter. You can't copy a bunch of events and then later copy their interpreter.
Q: I am using the tree-chop minigame, but some or all of my trees aren't showing up. A: First, make sure you copied over the Lumberjack Interpreter. Then, make sure you set the trees up in the Lumberjack Interpreter. Also make sure you put the right event number in $eventval for every tree. Make sure the % chance to spawn per second isn't extremely low. Make sure the Tree's time to stay spawned isn't too low. (This is on the first page of the Tree Interpreter at the top.)
Q: I get an error that says "undefined method '[] = ' for nil:NilClass." A: Make sure you copy and paste the script MG_Sys from F11 into your game.
Q: I get an error that says NoMethodError, undefined method x. A: You have too many trees in your Lumberjack Interpreter, or it's calling an event number that doesn't exist. Make sure all $eventval = are calling an actual event number.
Q: How do I change the animations? One way is to call the script $mganim = #, where # is the number of the animation you want played from the database. This will change the animation for most minigame events to this animation. If you want the event's animation to always be a certain animation, open the interpreter, go to the second page and find "get_character(ev_id-1).animation_id=$mganim" Just change $mganim to the animation number you want.
Q: How do I choose what happens when I successfully do button presses? A: Page 2 of the Interpreter. Label: End In that section put whatever events you want to happen when an event is successfully destroyed. The conditional branches above that are also important. $mgtotal goes up by one every time you successfully hit a button. $mgtype is sort of the "level" of the event, determined by the difficulty setting. They're pretty simple variable check branches. If you can figure out what they're doing you can change it to do whatever you want.
Q: How do I pick the graphic for the events? A: Page 1 of the Event. At the bottom you see where it sort of determines by your difficulty level of the tree the trees graphic. Those are where the graphic is determined. If you just want 1 single graphic, you should delete all but the one starting at >= 1.
Change Log
v0.96 - Most Current Version Added a new minigame button type. Press button when bar is at middle. Can also easily be changed to "Press for power." Will work on converting it to a spam Space for power but don't overfill game. Added the (MG) Bar common event for this minigame to work.
v0.95 Fixed the Respawn and Quit bug. Fixed an issue with saving and loading. Removed a need for the TEMP and P1 variables. Made animations dependent on the user setting it. Added the Boulder-Dash minigame example. Made all buttons flashing. Removed the need to put the (MG) Initializer in a map. Updated the comments to reflect these changes. Separated the comments for each part of the system into different events.
Any other Questions, please ask!
I'm always looking for feedback, suggestions, bug reports, comments, etc. This is my first Event submitted, though it does involve pseudo-scripting.
This post has been edited by Titanhex: Sep 21 2011, 09:02 AM