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

Veteran
Veteran
Joined
Oct 8, 2018
Messages
3,803
Reaction score
1,444
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

Daz3D has the weirdest number scheme for model generations...
Genesis 4 is the 4th generation and oldest currently available, Genesis 1 is the 5th generation, Genesis 2 is the 6th, 3 is the 7th.... And then it goes Genesis 8. So 4, 1, 2, 3, 8. So when looking through there store you have to remember that sometimes they'll say 6 but they mean 3, and vice versa. :kaoswt:
Would opening a topic with the tutorial be interesting?
Just finished my first Slip into Ruby since last July! It'll be up and added to the main post tomorrow, along with a new Jump into Javascript.

Forum statistics

Threads
111,107
Messages
1,058,325
Members
144,312
Latest member
zellemate
Top