GALV_maptravel研究分析(2)
本节地图:Gov's Mansion,Campsite,Yourmansion
++++++++++++++++++++华丽丽的分割线+++++++++++++++++++++++++++++++++
1.NPC处脚本
这里不需要过多解释,简单易懂
相关代码:
Galv.MAPT.openMap(0); 开启地图
if(Galv.MAPT.mapSelevted) 进行地点选择
{
跳转{map ID}({x Coordinate},{y Coordinate}) 进行跳转
}
++++++++++++++++++++华丽丽的分割线+++++++++++++++++++++++++++++++++
2.左上角处脚本
Galv.MAPT.initLocation("Gov's Mansion");
/*Set starting location for map scene to Gov's Mansion so when player opens
the travel scene, they will start with that location selected.*/
初始场景设置
Galv.MAPT.setObject(0,"Player","obj_player",520,190,2);
/*An example of using an object to show where the player is.
I'll place it next to the above location here*/
展示玩家的位置
语法: Galv.MAPT.setObject(id,"name","image",mx,my,f);
++++++++++++++++++++华丽丽的分割线+++++++++++++++++++++++++++++++++
3.开启之前无法到达的地图
Galv.MAPT.enableLocation(0,"Your Mansion",true);
{回顾下如果禁止通过:Galv.MAPT.enableLocation(0,"Your Mansion",false);}
/*Example of updating a location, which default to 'enabled' so the above
script call wouldn't be needed in this particular case*/
//Galv.MAPT.setLocation(0,"Your Mansion","loc_mansion",620,440,3,8,11,"This is your 'mansion' you can get in it now!");
Galv.MAPT.editLocation(0,"Your Mansion","desc","This is your 'mansion' you can get in it now!");
语法:
Galv.MAPT.editLocation(id,"name","attribute",value); // edit location
// id = the map id you are editing
// "name" = the location name you are editing
// "attribute" = the attribute you would like to edit. This can be:自选属性
// "image" value = "imageName" 图片
// "mapXY" value = [x,y] 地图
// "transfer" value = [mapid,x,y] 移动
// "desc" value = "description here" 描述
// value = the value to change to. values for each attribute are above. 值
++++++++++++++++++++华丽丽的分割线+++++++++++++++++++++++++++++++++
4.Galv.MAPT.removeLocation(0,"Gov's Mansion");
在大地图上移除地图