|
发表于 2010-7-19 09:36:56
|
显示全部楼层
两个问题得一起回答,
初始化的时候,
ForcePlayerStartLocation使得某玩家在某位置固定,即不再在接下来的随机分配过程中考虑那个玩家和那个位置
相当于玩家属性里德固定位置,但是这里指定位置
注意和SetPlayerStartLocation的区别
接下来的函数定义结盟优先权,就是哪些位置的开始点是更应该一伙的,功能还是类似和玩家属性的优先权设置
(不知你是否了解,比如默认同一组的玩家会分配到距离近的几个点,但有时你的设计比如隔离一条河,距离近的两个点未必是一伙的,这是需要优先权设置)
那个俩函数配合使用,具体就不讲了,下面一些说明:
native SetStartLocPrioCount takes integer whichStartLoc, integer prioSlotCount returns nothing
native SetStartLocPrio takes integer whichStartLoc, integer prioSlotIndex, integer otherStartLocIndex, startlocprio priority returns nothing
某个实例
call SetStartLocPrioCount( 0, 5 )
call SetStartLocPrio( 0, 0, 1, MAP_LOC_PRIO_HIGH )
call SetStartLocPrio( 0, 1, 2, MAP_LOC_PRIO_HIGH )
call SetStartLocPrio( 0, 2, 4, MAP_LOC_PRIO_HIGH )
call SetStartLocPrio( 0, 3, 5, MAP_LOC_PRIO_HIGH )
call SetStartLocPrio( 0, 4, 6, MAP_LOC_PRIO_LOW )
call SetStartLocPrioCount( 1, 1 )
call SetStartLocPrio( 1, 0, 7, MAP_LOC_PRIO_HIGH )
call SetStartLocPrioCount( 2, 2 )
call SetStartLocPrio( 2, 0, 3, MAP_LOC_PRIO_LOW )
call SetStartLocPrio( 2, 1, 5, MAP_LOC_PRIO_HIGH )
call SetStartLocPrioCount( 3, 1 )
call SetStartLocPrio( 3, 0, 2, MAP_LOC_PRIO_HIGH )
call SetStartLocPrioCount( 4, 1 )
call SetStartLocPrio( 4, 0, 6, MAP_LOC_PRIO_HIGH )
call SetStartLocPrioCount( 5, 3 )
call SetStartLocPrio( 5, 0, 2, MAP_LOC_PRIO_HIGH )
call SetStartLocPrio( 5, 1, 4, MAP_LOC_PRIO_HIGH )
call SetStartLocPrio( 5, 2, 6, MAP_LOC_PRIO_HIGH )
call SetStartLocPrioCount( 6, 1 )
call SetStartLocPrio( 6, 0, 4, MAP_LOC_PRIO_HIGH )
call SetStartLocPrioCount( 7, 1 )
call SetStartLocPrio( 7, 0, 1, MAP_LOC_PRIO_HIGH ) |
|