赞 | 160 |
VIP | 0 |
好人卡 | 3 |
积分 | 161 |
经验 | 39823 |
最后登录 | 2024-12-27 |
在线时间 | 3996 小时 |
Lv4.逐梦者
- 梦石
- 0
- 星屑
- 16119
- 在线时间
- 3996 小时
- 注册时间
- 2015-9-14
- 帖子
- 1337
|
本帖最后由 wabcmcc 于 2017-4-1 14:18 编辑
台灣教學網站siakoMobi:https://app.siako.mobi/Tutorials/RMMVScripting/
用js腳本教學(youtube視頻).
RMMV事件對應指令http://www.chimakier.com/%e3%80%90rm%e6%95%99%e5%ad%b8-%e3%80%91rmmv%e8%88%87%e5%b0%8d%e6%87%89%e8%85%b3%e6%9c%ac%e6%8c%87%e4%bb%a4/
事件指令 對應腳本語法
顯示文字 $gameMessage.setFaceImage(‘Actor1’,0)
$gameMessage.setBackground(1)
$gameMessage.setPositionType(1)
$gameMessage.add(“Show Text Script Call")
顯示選項 choices = []; params = [];
$gameMessage.setChoices(choices, 0)
choices.push(“I love you1″);choices.push(“I love you2″);
choices.push(“I love you3″);choices.push(“I love you4″);
choices.push(“I love you5″);choices.push(“I love you6″);
choices.push(“I love you7″);choices.push(“I love you8″);
params.push()
數字輸入 $gameMessage.setNumberInput(var, digits);
選擇項目-道具類型 $gameMessage.setItemChoice(var, n);
滾動文字訊息 $gameMessage.setScroll(scrolling_speed, no_fast_forward);
$gameMessage.add(“Text");
變更金幣 $gameParty.gainGold(n);
變更武器 $gameParty.gainItem($dataWeapons[weaponId], n, true/false *note);
變更裝備 $gameParty.gainItem($dataArmorsweaponId], n, true/false *note);
變更隊伍 $gameParty.addActor(n);
$gameParty.removeActor(n);
變更開關 $gameSwitches.setValue(num, true/false);
變更變數 $gameVariables.setValue(var, value);
變更自開關 $gameSelfSwitches.setValue(key, true/false);
變更計時器 $gameTimer.start(time); $gameTimer.stop();
條件分期 if (code) { stuff } else { stuff }
迴圈 while (;;) { stuff }
斷開迴圈 break;
結束事件 $gameInterpreter._index = $gameInterpreter._list.length;
一般(公用)事件 $gameTemp.reserveCommonEvent(n);
變更HP $gameActors.actor(actorId).gainHp(n)
變更MP $gameActors.actor(actorId).gainMp(n)
變更TP $gameActors.actor(actorId).gainTp(n)
變更狀態 $gameActors.actor(actorId).addState(n);
$gameActors.actor(actorId).removeState(n);
恢復全體 for (var j = 0; j < $gameActors.length; j++) { $gameActors.actor(j).recoverAll(); };
變更經驗 $gameActors.actor(actorId).gainExp(n);
變更等級 $gameActors.actor(actorId).changeLevel(n, true/false);
變更數值 $gameActors.actor(actorId).addParam(paramId, n);
變更數值 $gameActors.actor(actorId).learnSkill(n);
$gameActors.actor(actorId).forgetSkill(n);
變更裝備 $gameActors.actor(actorId).changeEquip(slotId, item);
變更名稱 $gameActors.actor(actorId).setName(n)
變更職業 $gameActors.actor(actorId).changeClass(n, keepExp)
變更名稱 $gameActors.actor(actorId).setNickname(n)
變更簡介 $gameActors.actor(actorId).setProfile(n)
轉移玩家場景 $gamePlayer.reserveTransfer(mapId, x, y, direction, fade type);
設定交通工具 $gameMap.vehicle(vehicleId).setLocation(mapId, x, y);
設定事件位置 $gameMap.event(eventID).setPosition(x, y)
滾動畫面 $gameMap.startScroll(direction, distance, speed);
設定交通工具可否搭乘 $gamePlayer.getOnOffVehicle();
等待 $gameInterpreter.wait(frames);
變更透明度 $gamePlayer.setTransparent(flag)
跟隨者顯示 $gamePlayer.showFollowers();
$gamePlayer.hideFollowers();
集合跟隨者 $gamePlayer.gatherFollowers();
this.setWaitMode(‘gather’);
顯示氣球圖示 character.requestBalloon(id);
this.setWaitMode(‘balloon’);
消除事件 $gameMap.eraseEvent(this._eventId);
淡出/淡入畫面 $gameScreen.startFadeOut(fade_speed);
$gameScreen.startFadeIn(fade_speed);
著色畫面 $gameScreen.startTint([red,green,blue,grey], duration);
閃光畫面 $gameScreen.startTint([red,green,blue,intensity], duration);
震動畫面 $gameScreen.startShake(power, speed, duration);
天氣效果 $gameScreen.changeWeather(“weather", power, duration);
顯示圖片 $gameScreen.showPicture(pictureId, name, origin, x, y,scaleX, scaleY, opacity, blendMode)
移動圖片 $gameScreen.movePicture(pictureId, origin, x, y, scaleX,scaleY, opacity, blendMode, duration)
混合模式 $gameScreen._pictures[id]._blendMode = #
旋轉圖片 $gameScreen.rotatePicture(pictureId, speed);
著色圖片 $gameScreen.tintPicture(pictureId, tone, duration);
消除圖片 $gameScreen.erasePicture(pictureId);
播放BGM AudioManager.playBgm( refer to sound object above );
#聲音物件格式: { name: filename, volume: n, pitch: n, pan: n }
淡出BGM AudioManager.fadeOutBgm(n);
儲存BGM $gameSystem.saveBgm();
繼續播放BGM $gameSystem.replayBgm();
播放BGM AudioManager.playBgs( refer to sound object above );
淡出BGS AudioManager.fadeOutBgs(n);
播放ME AudioManager.playMe( refer to sound object above );
播放SE AudioManager.playSe( refer to sound object above );
暫停se AudioManager.stopSe();
播放動畫 Graphics.playVideo(path/name.ext);
戰鬥處理 BattleManager.setup(troopId, true/false, true/false);
$gamePlayer.makeEncounterCount();
SceneManager.push(Scene_Battle);
商店處理 SceneManager.push(Scene_Shop);
名稱輸入處理 SceneManager.push(Scene_Name);
SceneManager.prepareNextScene(actorId, name length);
開啟選單 SceneManager.push(Scene_Menu);
開以記錄/讀取錄選單 SceneManager.push(Scene_Save);
SceneManager.push(Scene_Load);
遊戲結束/回標題畫面 SceneManager.goto(Scene_Gameover);
SceneManager.goto(Scene_Title);
執行地圖特定事件頁面 $gameMap.event(EventID, EventPage).start();
更換地圖顯示名稱 $gameMap.enableNameDisplay();
$gameMap.disableNameDisplay();
更換圖快設置 $gameMap.changeTileset(n);
更換戰鬥背景 $gameMap.changeBattleback(filename, filename);
更換遠景 $gameMap.changeParallax(name, loopX, loopY, speed x, speed y);
獲得位置資訊 $gameMap.terrainTag(x, y);
$gameMap.eventIdXy(x, y);
$gameMap.tileId(x, y, layer);
獲得地形區塊ID $gameMap.regionId(x, y);
更換戰鬥音樂/勝利ME $gameSystem.setBattleBgm(name);
$gameSystem.setVictoryMe(name);
更換戰敗音效 $gameSystem.setDefeatMe(name);
更換交通工具BGM $gameMap.vehicle(vehicleId).setBgm(name);
修改存檔功能訪問 $gameSystem.disableSave();
$gameSystem.enableSave();
修改菜單功能訪問 $gameSystem.disableMenu();
$gameSystem.enableMenu();
修改系統訪問 $gameSystem.disableEncounter();
$gameSystem.enableEncounter();
修改陣型功能訪問 $gameSystem.disableFormation();
$gameSystem.enableFormation();
修改視窗顏色 $gameSystem.setWindowTone(tone); (red, green, blue, gray);
修改角色圖像 $gameActors.actor(actorId).setCharacterImage(name, index);
$gameActors.actor(actorId).setFaceImage(name, index):
$gameActors.actor(actorId).setBattlerImage(name);
修改交通工具圖像 $gameMap.vehicle(vehicleId).setImage(name, index);
更改敵人HP/MP/TP $gameTroop.members()[enemyIndex].gainHp(n);
$gameTroop.members()[enemyIndex].gainMp(n);
$gameTroop.members()[enemyIndex].gainTp(n);
更改敵人狀態 $gameTroop.members()[enemyIndex].addState(n);
$gameTroop.members()[enemyIndex].removeState(n);
敵人恢復 $gameTroop.members()[enemyIndex].recoverAll();
更改出現敵人 $gameTroop.members()[enemyIndex].appear();
敵人變形(更換敵人) $gameTroop.members()[enemyIndex].transform(n);
顯示戰鬥動畫 $gameTroop.members()[enemyIndex].startAnimation(animationId, true/false, delayN);
我方強制動作 $gameParty.members()[index].forceAction(skillId, targetIndex);
BattleManager.forceAction($gameParty.members()[index]);
敵人強制動作 $gameTroop.members()[index].forceAction(skillId, targetIndex);
BattleManager.forceAction($gameTroop.members()[index]);
中止戰鬥 BattleManager.abort();
|
|