Desbrina

Villager
Member
Joined
Sep 2, 2013
Messages
5
Reaction score
0
First Language
English
Primarily Uses
I'm trying to get my head around MV scripting having been used to XP.

I'm trying to do a (hopefully simple) teleport system. I have a window created, but am unsure on how to create the choices, and update the menu when you switch between the choices

I also want to be able to add an image below the text

so far I have

JavaScript:
(function() {
    
    var location1 = ['Location 1', 'A brief description of the location', 'Map ID', 'X', 'Y', true];
    var locations = [location1];
    
    var commandWindowWidth = 200;
    
    function Window_MyWindow() {
     this.initialize.apply(this, arguments);
    }
    
    Window_MyWindow.prototype = Object.create(Window_Base.prototype);
    Window_MyWindow.prototype.constructor = Window_MyWindow;
    
    Window_MyWindow.prototype.initialize = function(x, y, width, height) {
        Window_Base.prototype.initialize.call(this, x, y, width, height);
        this.refresh();
    };
    
    Window_MyWindow.prototype.refresh = function() {
        var completed = (locations[0][5]) ? "Completed" : "Incomplete";
        this.drawText(locations[0][0] + " - " + completed, 0, 0, this.contentsWidth(), this.lineHeight());
        this.drawText("A brief description of the location", 0, 50, this.contentsWidth(), this.lineHeight());
        // Draw image at 100, 0
        
    };
    
    var _Scene_Map_createAllWindows = Scene_Map.prototype.createAllWindows;
    Scene_Map.prototype.createAllWindows = function() {
        _Scene_Map_createAllWindows.call(this);
        this.createMinimapWindow();
    };
    
    Scene_Map.prototype.createMinimapWindow = function() {
        this._minimapWindow = new Window_MyWindow(commandWindowWidth+1, 0, Graphics.width - commandWindowWidth, Graphics.height);
        this.addChild(this._minimapWindow);
    };
    
 })();
 
Last edited:

ShadowDragon

Realist
Veteran
Joined
Oct 8, 2018
Messages
3,910
Reaction score
1,487
First Language
Dutch
Primarily Uses
RMMV
creating a list, require at least 2 windows,
1 for the list of command, 1 for the image/description.

also this require some codings in order to work, how to get the ID, by switch, by command etc.
you can look through some map travels plugins how they are made, some require editing, some by params,
some by a different way. but it wouldn't be that simple to be honest :p
 

Latest Threads

Latest Posts

Latest Profile Posts

just beat ff7 original for the first time since 2010. having played remake last year, I have a much better appreciation for the original oddly enough. I still like some of the character presentation in remake more, but the original's got a lot going for it.
Ever reach that moment in your life when your juggling a dozen or more projects that you know will never be made but don't have the heart to delete them? Ugh, I hate those moments...
:kaosigh: Why must you hurt me so?
my main character isn't the warrior of light or the chosen one, he's a self righteous, invasive try hard who gets ahead of himself and makes a critical error, resulting in a downward moral spiral that, eventually, leads him to truths that make him a better man, and im DAMN proud of that.
Generate Actors, Dark Fantasy Monsters, & I Heard There Was a Chosen One, | RPG Maker News #42

Work on Cat Quest: The Last Catmancer continues slowly but surely. :kaopride: Today I received the Game Over screen from @Finnuval!
GameOver.png

Forum statistics

Threads
111,446
Messages
1,061,162
Members
144,809
Latest member
Everrealway
Top