RPG Maker Forums

JavaScript:
function oneAnimationFrame() {
    // Picture Index for each slot
    idx = {
        base: 5,
        cage: 6,
        lower: 7,
        upper: 8,
        eyes: 9,
        mouth: 10,
        neck: 11,
        outfit: 12
    }
    // Base/Naked Always Rendered
    numstring = ($aframe < 10 ? base + "0" : "") + String($aframe)
    basepic = $animbase + numstring
    $gameScreen.showPicture(idx['base'], fullpic, 0, 0, 0, 100, 100, 255, 0);
    if($gameActors.actor(1).equips()[5] != null) {
        switch($gameActors.actor(1).equips()[5].id) {
            case 8:
                eqname = "cage";
                break;
            default:
                console.log("Error, you're not wearing a cage!");
        }
        cagepic = $animbase + eqname + numstring;
        $gameScreen.showPicture(idx['cage'], cagepic, 0, 0, 0, 100, 100, 255, 0);
    }
    if($gameActors.actor(1).equips()[4] != null) {
        switch($gameActors.actor(1).equips()[4].id) {
            case 2:
                eqname = "frill";
                break;
            case 4:
                eqname = "red";
                break;
            case 5:
                eqname = "blue";
                break;
            case 7:
                eqname = "green";
                break;
            default:
                console.log("Error, you're not wearing a lower item!");
        }
        lowerpic = $animbase + eqname + numstring;
        $gameScreen.showPicture(idx['lower'], lowerpic, 0, 0, 0, 100, 100, 255, 0);
    }
    if($gameActors.actor(1).equips()[6] != null) {
        switch($gameActors.actor(1).equips()[6].id) {
            case 3:
                eqname = "Frin";
                break;
            default:
                console.log("Error, you're not wearing an upper item!");
        }
        upperpic = $animbase + eqname + numstring;
        $gameScreen.showPicture(idx['upper'], upperpic, 0, 0, 0, 100, 100, 255, 0);
    }
    if($gameActors.actor(1).equips()[9] != null) {
        switch($gameActors.actor(1).equips()[9].id) {
            case 11:
                eqname = "fall";
                break;
            default:
                console.log("Error, you're not wearing an eye effect!");
        }
        eyespic = $animbase + eqname + numstring;
        $gameScreen.showPicture(idx['eyes'], eyespic, 0, 0, 0, 100, 100, 255, 0);
    }
    if($gameActors.actor(1).equips()[8] != null) {
        switch($gameActors.actor(1).equips()[8].id) {
            case 10:
                eqname = "bit";
                break;
            default:
                console.log("Error, you're not wearing a mouth item!");
        }
        mouthpic = $animbase + eqname + numstring;
        $gameScreen.showPicture(idx['mouth'], mouthpic, 0, 0, 0, 100, 100, 255, 0);
    }
    if($gameActors.actor(1).equips()[7] != null) {
        switch($gameActors.actor(1).equips()[7].id) {
            case 9:
                eqname = "col";
                break;
            default:
                console.log("Error, you're not wearing a neck accessory!");
        }
        neckpic = $animbase + eqname + numstring;
        $gameScreen.showPicture(idx['neck'], neckpic, 0, 0, 0, 100, 100, 255, 0);
    }
    if($gameActors.actor(1).equips()[3] != null) {
        switch($gameActors.actor(1).equips()[3].id) {
            case 6:
                eqname = "apr";
                break;
            default:
                console.log("Error, you're not wearing an outfit!");
        }
        outfitpic = $animbase + eqname + numstring;
        $gameScreen.showPicture(idx['outfit'], outfitpic, 0, 0, 0, 100, 100, 255, 0);
    }
}
A friend of mine is helping me with this code for my game, but he is better at vxace then mv so we're having trouble. I was hoping someone could tell me what's wrong with the code. It's supposed to show a bunch of different layers of a character animation.

Latest Threads

Latest Profile Posts

Don't forget, aspiring writers: Personality isn't what your characters do, it is WHY they do it.
Hello! I would like to know if there are any pluggings or any way to customize how battles look?
I was thinking that when you start the battle for it to appear the eyes of your characters and opponents sorta like Ace Attorney.
Sadly I don't know how that would be possible so I would be needing help! If you can help me in any way I would really apreciate it!
The biggest debate we need to complete on which is better, Waffles or Pancakes?
rux
How is it going? :D
Day 9 of giveaways! 8 prizes today :D

Forum statistics

Threads
106,048
Messages
1,018,543
Members
137,834
Latest member
EverNoir
Top