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
4,007
Reaction score
1,522
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

Gotta love when RM just decides it's done with existence and closes when you're in an event.
Good grief am I ever so dusty on music creation. Never move, gentleman and ladies!
After waiting for several months to observe the results of vaccines, I finally decided to go for Comirnaty, because now my job needs me to either be vaccinated or take a regular testing every 2 weeks(240 HKD per test), and it seems to me that Comirnaty is safe enough in my case :)
So, to create multiple faces one needs to first export, then import, over and over... who came up with this weird mechanism...
Away from home now since it reduce COVID spread

Forum statistics

Threads
112,315
Messages
1,067,283
Members
145,939
Latest member
fooples
Top