RPG Maker Forums

So hi guys,


I was wondering because I want to do something like a atb system similar to this : 





the problem in Ruby it's easy...but in JS it's kinda weird...I just don't know how to do a proper "each" method.


here my coding...in simple this really similar to game_Battler I just don't know how to initialize it

var NioPlugin = NioPlugin || {};
var NioPlugin.ATB_GUI = NioPlugin.ATB_GUI || {};


//==============================================================================
// ■ Sprite_ATB
//------------------------------------------------------------------------------
// The Sprite class who handle
//==============================================================================
function Sprite_ATB(){this.initialize.apply(this,arguments);}
Sprite_ATB.prototype.constructor = Sprite_ATB;

Sprite_ATB.prototype = Object.create(Sprite_Base.prototype);

Sprite_ATB.prototype.initialize = function(battler) {
Sprite_Base.prototype.initialize.call(this);
this.initMember();
this.setBattler(battler);
};

Sprite_ATB.prototype.initMember = function() {
this.anchor.x = 0.5;
this.anchor.y = 1;
this._homeX = 0;
this._homeY = 0;
this._finalX = 0;
this._finaly = 0;
this._battler = null;

};

Sprite_ATB.prototype.setBattler = function(battler) {
this._battler = battler;
};

Sprite_ATB.prototype.update = function() {
Sprite_Base.prototype.update.call(this);
while(ImageManager.isReady() != true){
this.loadBitmap();
}
if(this._battler && ImageManager.isReady()){
this.updateVisibility();
this.bitmap = ImageManager.loadSystem("ATB_" + this._battler.name());
} else {
this.bitmap = ImageManager.loadSystem("");
}
};
//===============================================================================
// => END : Sprite_ATB
//===============================================================================

//==============================================================================
// ■ Spriteset_Battle
//------------------------------------------------------------------------------
// The set of sprites on the battle screen.
//==============================================================================

NioPlugin.ATB_GUI.createUpperLayer = Spriteset_Battle.prototype.createUpperLayer;
Spriteset_Battle.prototype.createUpperLayer = function(){
NioPlugin.ATB_GUI.createUpperLayer.call(this);
this.createATBLayout();
this.createATBFace();
};

Spriteset_Battle.prototype.createATBLayout = function() {
this._layout = new Sprite();
this._layout.bitmap = ImageManager.loadSystem("atbLayout");
this._layout.x = 100;
this._layout.y = 100;
this.addChild(this._layout);
};

Spriteset_Battle.prototype.createATBFace = function() {
this.createEnemieFaces();
this.createActorFaces();
};

Spriteset_Battle.prototype.createEnemieFaces = function() {};

// create the ATB actorFace for the atb bar
Spriteset_Battle.prototype.createActorFaces = function() {
this._atbActor = [];
for (var i = 0; i < this._atbActor.length; i++) {
this._atbActor = new Sprite_ATB(i);
this._battleField.addChild(this._atbActor);
};
};

// from a exemple I am unsure if this could work actually
for (var i = $gameParty.members().length - 1; i >= 0; i--) {
var actor = $gameParty.members();
}






thanks for any further answer

Latest Threads

Latest Profile Posts

Our latest feature is an interview with... me?!

People4_2 (Capelet off and on) added!

Just beat the last of us 2 last night and starting jedi: fallen order right now, both use unreal engine & when I say i knew 80% of jedi's buttons right away because they were the same buttons as TLOU2 its ridiculous, even the same narrow hallway crawl and barely-made-it jump they do. Unreal Engine is just big budget RPG Maker the way they make games nearly identical at its core lol.
Can someone recommend some fun story-heavy RPGs to me? Coming up with good gameplay is a nightmare! I was thinking of making some gameplay platforming-based, but that doesn't work well in RPG form*. I also was thinking of removing battles, but that would be too much like OneShot. I don't even know how to make good puzzles!
one bad plugin combo later and one of my followers is moonwalking off the screen on his own... I didn't even more yet on the new map lol.

Forum statistics

Threads
106,035
Messages
1,018,454
Members
137,821
Latest member
Capterson
Top