//这些代码是系统自动生成的,请不要修改这些代码 package { public class EventCommands { public function cmdlist_Map1Event6Page1_1() { ShowDialog("老人", "我是老人\n在Flash魔塔样板中\n请直接创建我就行了"); ShowDialog("老人", "不再像原来RMXP那样\n都用复制的方法创建"); ShowDialog("老人", "但是事件名必须以NPC开头\n切记!"); } public function cmdlist_Map1Event1Page1_1() { Game.switches[2] = true; } public function cmdlist_Map1Event2Page1_1() { Game.switches[2] = false; } public function cmdlist_Map2Event1Page1_1() { Game.switches[2] = true; } public function cmdlist_Map2Event2Page1_1() { Game.switches[2] = false; } public function cmdlist_Map3Event1Page1_1() { Game.switches[2] = true; } public function cmdlist_Map3Event2Page1_1() { Game.switches[2] = false; } public function cmdlist_Map4Event6Page1_1() { ShowDialog("杰克", "名称以“#”符号开头的地图\n将不会被输出(编译)到最终的Flash游戏文件中"); ShowDialog("杰克", "名称以“*”符号开头的地图\n是魔塔样板中自带的楼层地图\n正式的魔塔地图请不要带上这个符号"); ShowDialog("杰克", "如果地图中同时存在\n“*1,1”和“1,1”这两幅地图的话\n那么“*1,1”将不会被编译"); ShowDialog("杰克", "对于地图名“1,3”\n1是魔塔编号\n3是指三楼"); ShowDialog("杰克", "地下楼层魔塔编号不变"); } public function cmdlist_Map4Event1Page1_1() { Game.switches[2] = true; } public function cmdlist_Map4Event7Page1_1() { ShowDialog("仙子", "暗墙的事件名必须以“暗墙”开头\n事件内容可以留空"); ShowDialog("仙子", "当然在事件内容中可以加一些判断语句\n判断是否打开暗墙"); ShowDialog("仙子", "如果执行:中断事件处理\n那么暗墙将不会被打开"); ShowDialog("仙子", "像这种规定了事件名开头\n并且事件内容通常留空的事件\n叫做“预制事件”"); ShowDialog("仙子", "在Flash魔塔样板中有很多预制事件\n使用预制事件的目的是为了减少执行事件\n加快游戏运行速度、提高游戏运行效率"); ShowDialog("仙子", "同时也简化游戏的制作"); Game.variables[12] = 1; } public function cmdlist_Map4Event2Page1_1() { Game.switches[2] = false; } public function cmdlist_Map4Event8Page1_1() { // 当变量12不等于1时 // 暗墙将无法打开 return false; } public function cmdlist_Map4Event10Page1_1() { ShowDialog("仙子", "这是一个无条件打开的暗墙\n因为事件内容是空白"); } public function cmdlist_Map5Event1Page1_1() { Game.switches[2] = true; } public function cmdlist_Map5Event2Page1_1() { Game.switches[2] = false; } public function cmdlist_Map6Event1Page1_1() { Game.switches[2] = true; } public function cmdlist_Map6Event2Page1_1() { Game.switches[2] = false; } public function cmdlist_CommonEvent1_1() { // 在RMXP魔塔样板中,开始地图一片漆黑 // 而在Flash魔塔样板中,开始地图就是实际的0层 // // 游戏初始化时全在这里进行哦 // 这个公共事件一旦执行完了,就立即切换到0层地 // 图了哦 } public function cmdlist_CommonEvent3_1() { Game.switches[1] = true; Game.switches[2] = false; Game.variables[2] = 105; Game.variables[12] *= Game.variables[2]; Game.variables[12] %= 7; // 以下是在事件中嵌入AS3循环语句的示例 var i:int; var str:String = " () \"{ "; var reg:RegExp = /haha/; var snake, number, food; snake = number = food = 48; for (i = 0; i < 4; i++) { ShowDialog(null, "变量i的值为" + (i).toString() + "\n" + (food).toString() + (number).toString() + (snake).toString() + "\n" + (is*2).toString() + "\n" + (number*2+food).toString() + Game.variables[3].toString() + "\n" + Game.variables[4].toString()); } return false; } public function cmdlist_Map7Event1Page1_1() { Game.switches[2] = true; } public function cmdlist_Map7Event2Page1_1() { Game.switches[2] = false; } public function cmdlist_Map8Event1Page1_1() { Game.switches[2] = true; } public function cmdlist_Map8Event2Page1_1() { Game.switches[2] = false; } } }
|