找回密码
 点一下
查看: 1224|回复: 2

问几个函数的作用以及区别

[复制链接]
发表于 2010-7-19 02:04:22 | 显示全部楼层 |阅读模式
ForcePlayerStartLocation是说设置势力的起始点??SetStartLocPrioCount是干什么的??SetStartLocPrio呢?它和前面一个有什么区别
发表于 2010-7-19 05:45:59 | 显示全部楼层
Q: ForcePlayerStartLocation是说设置势力的起始点??
A: 对呀对呀~ 这个好像可以用来固定玩家位置吧...

Q: SetStartLocPrioCount是干什么的??SetStartLocPrio呢?它和前面一个有什么区别
A: 这个是设置联盟优先权的... 具体咋用偶也不清楚。楼主可以自己弄个空图,然后导出脚本看看WE怎么用的。
回复

使用道具 举报

发表于 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 )
回复

使用道具 举报

您需要登录后才可以回帖 登录 | 点一下

本版积分规则

Archiver|移动端|小黑屋|地精研究院

GMT+8, 2024-9-29 00:16 , Processed in 0.037222 second(s), 19 queries .

Powered by Discuz! X3.5

© 2001-2023 Discuz! Team.

快速回复 返回顶部 返回列表