More than 999 events?

Laurent

Veteran
Veteran
Joined
Mar 5, 2016
Messages
108
Reaction score
3
First Language
French
Primarily Uses
I have a problem with a gameplay on my map.

On this map, when the player walks a step, there is an event with a variable +1.
When the variable is +13 (common event) : you die. There are some places that allow you to rest in order to reset your energy (variable =0) and continue the progression.
The problem is: I can't put more than 999 events of my map.

So, I have 2 questions:
Can I realize this gameplay differently than by copying and pasting thousands of events?
If no, how to put more than 999 events?
 
Last edited:

bgillisp

Global Moderators
Global Mod
Joined
Jul 2, 2014
Messages
13,522
Reaction score
14,255
First Language
English
Primarily Uses
RMVXA
You could do this with regions (the R tile) and a region common event plug-in. Basically, mark one region the area where the variable goes up, and one region where you reset it. Then, set up the two common events for those regions (see the directions in the plug-in, it will vary depending on what plug-in you use). Should work, and you will need a lot less events.
 

Laurent

Veteran
Veteran
Joined
Mar 5, 2016
Messages
108
Reaction score
3
First Language
French
Primarily Uses
Oh, thank you !!!!
 
Last edited:

Trihan

Speedy Scripter
Veteran
Joined
Apr 12, 2012
Messages
2,604
Reaction score
1,959
First Language
English
Primarily Uses
RMMV
I'll just leave this here.

Code:
//=============================================================================
// LaurentEnergy.js
//=============================================================================

/*:
 * @plugindesc Quick overwrite of the player's moveStraight function to add to a variable when on a certain region, game over if the variable is 13, and reset the variable to 0 when on a certain other region.
 *
 * @param Fatigue region
 * @desc The region ID which will add to the fatigue variable.
 * @default 254
 *
 * @param Reset region
 * @desc The region ID which will reset the fatigue variable.
 * @default 255
 *
 * @param Fatigue variable
 * @desc The ID of the variable that will track fatigue.
 * @default 1
 *
 * @param Fatigue limit
 * @desc The variable value at which a game over will occur.
 * @default 13
 *
 * @author John Clifford (Trihan)
 *
 * @help
 *
 * Plug and play, turn the plugin on.
 *
 * TERMS OF USE
 * This plugin is free to use for any purpose. Credit is appreciated but unnecessary.
 *
 */

(function() {
    var currentScriptPath = document.currentScript.src;
    var startIndex = currentScriptPath.lastIndexOf('/') + 1;
    var numChars = currentScriptPath.lastIndexOf('.') - startIndex;
    var currentScriptName = currentScriptPath.substr(startIndex, numChars);
    var parameters = PluginManager.parameters(currentScriptName);
   
    var fatigueRegion = Number(parameters['Fatigue region']);
    var resetRegion = Number(parameters['Reset region']);
    var fatigueVar = Number(parameters['Fatigue variable']);
    var fatigueLimit = Number(parameters['Fatigue limit']);
   
    _Game_Player_moveStraight = Game_Player.prototype.moveStraight;
    Game_Player.prototype.moveStraight = function(d) {
        _Game_Player_moveStraight.call(this, d);
        if ($gamePlayer.regionId() === fatigueRegion) {
            $gameVariables.setValue(fatigueVar, $gameVariables.value(fatigueVar) + 1);
            if ($gameVariables.value(fatigueVar) === fatigueLimit) {
                SceneManager.goto(Scene_Gameover);
            }
        } else if ($gamePlayer.regionId() === resetRegion) {
            $gameVariables.setValue(fatigueVar, 0);
        }
    };
})();
 

Users Who Are Viewing This Thread (Users: 0, Guests: 1)

Latest Threads

Latest Posts

Latest Profile Posts

Couple hours of work. Might use in my game as a secret find or something. Not sure. Fancy though no? :D
Holy stink, where have I been? Well, I started my temporary job this week. So less time to spend on game design... :(
Cartoonier cloud cover that better fits the art style, as well as (slightly) improved blending/fading... fading clouds when there are larger patterns is still somewhat abrupt for some reason.
Do you Find Tilesetting or Looking for Tilesets/Plugins more fun? Personally I like making my tileset for my Game (Cretaceous Park TM) xD
How many parameters is 'too many'??

Forum statistics

Threads
105,865
Messages
1,017,059
Members
137,575
Latest member
akekaphol101
Top