仙魔无双SDK
面向策划逻辑制作的游戏开发包
|
按各种条件召唤NPC的操作 更多...
函数 | |
int | RescueMonster (FxCreature *pActor, unsigned long nMonsterID, unsigned long nCount=1, unsigned long nRandomPos=400, unsigned long nTime=0xFFFFFFFF, float fOrientation=0.00f, unsigned long nUpHeight=2000) |
角色pActor在自身位置nRandomPos半径内随机的位置以营救的方式召唤怪物,模板ID为nMonsterID,个数为nCount 更多... | |
int | RegisterSceneGlobalNPC (FxCreature *pActor) |
角色pActor注册自己为场景级别的全局NPC 更多... | |
int | UnRegisterSceneGlobalNPC (FxCreature *pActor) |
角色pActor反注册自己为场景级别的全局NPC 更多... | |
unsigned long | GetSceneGlobalNPC (FxCreature *pActor, unsigned long nTemplateID) |
角色pActor根据模板ID,获取自己所在场景的该模板ID的全局NPC实例 更多... | |
unsigned long | GetSceneGlobalNPC (FxScene *pScene, unsigned long nTemplateID) |
根据场景对象,获取指定场景的该模板ID的全局NPC实例 更多... | |
int | CreateMonster (FxCreature *pActor, unsigned long nMonsterID, unsigned long nCount=1, unsigned long nRandomPos=400, unsigned long nTime=0xFFFFFFFF, float fOrientation=0.00f, unsigned long nMinRandPos=0, unsigned long nUpHeight=2000, bool bGravity=true) |
角色pActor在自身位置nMinRandPos和nRandomPos半径之间的范围内随机的位置召唤怪物,模板ID为nMonsterID,个数为nCount 更多... | |
int | CreateMonsterOnTarget (FxCreature *pActor, FxCreature *pTarget, unsigned long nMonsterID, unsigned long nCount=1, unsigned long nRandomPos=400, unsigned long nTime=0xFFFFFFFF, float fOrientation=0.00f, unsigned long nUpHeight=2000, bool bGravity=true) |
角色pActor在目标pTarget的位置的nRandomPos半径之内的范围内随机的位置召唤怪物,模板ID为nMonsterID,个数为nCount 更多... | |
int | CreateMonsterInScene (FxScene *pScene, int nPosX, int nPosY, int nPosZ, unsigned long nMonsterID, unsigned long nCount=1, unsigned long nRandomPos=0, unsigned long nTime=0xFFFFFFFF, float fOrientation=0.00f, unsigned long nMinRandPos=0, unsigned long nUpHeight=2000, bool bGravity=true, unsigned long nSrcID=0) |
在场景pScene的指定坐标[nPosX, nPosY, nPosZ]创建怪物nMonsterID。 更多... | |
int | CreateMonsterOnTargetEx (FxScene *pScene, FxCreature *pTarget, unsigned long nMonsterID, float fAngle=0.0f, float fRad=0.0f, unsigned long nTime=0xFFFFFFFF, float fOrientation=0.00f, unsigned long nUpHeight=2000, bool bGravity=true, unsigned long nSrcID=0) |
角色pActor在目标pTarget的位置的由方向fAngle和半径fRad指定的极坐标位置召唤怪物,模板ID为nMonsterID,个数为nCount。 更多... | |
int | CreateMonsterByTripPoint (FxCreature *pActor, unsigned long nTripPointID, unsigned long nMonsterID, unsigned long nCount=1, unsigned long nRandomPos=0, unsigned long nTime=0xFFFFFFFF, float fOrientation=0.00f, unsigned long nMinRandPos=0, unsigned long nUpHeight=2000, bool bGravity=true) |
在角色pActor所在的场景的指定转跳点nTripPointID创建怪物nMonsterID。 更多... | |
int | CreateTaskMonster (FxCreature *pActor, unsigned long nTaskID, unsigned long nMonsterID, unsigned long nRouteID) |
给角色pActor创建任务怪nMonsterID,任务为nTaskID,路径为nRouteID 更多... | |
按各种条件召唤NPC的操作
int CreateMonster | ( | FxCreature * | pActor, |
unsigned long | nMonsterID, | ||
unsigned long | nCount = 1 , |
||
unsigned long | nRandomPos = 400 , |
||
unsigned long | nTime = 0xFFFFFFFF , |
||
float | fOrientation = 0.00f , |
||
unsigned long | nMinRandPos = 0 , |
||
unsigned long | nUpHeight = 2000 , |
||
bool | bGravity = true |
||
) |
角色pActor在自身位置nMinRandPos和nRandomPos半径之间的范围内随机的位置召唤怪物,模板ID为nMonsterID,个数为nCount
pActor | [角色] 角色对象。 |
nMonsterID | [整数] 怪物的模板ID。 |
nCount | [整数] 营救的个数,默认1。 |
nRandomPos | [整数] 自身为中心的随机位置的最大半径,默认400。如果是0,则严格在自身位置召唤。 |
nTime | [整数] 召唤出的怪物的生存时间,默认-1,即永久。 |
fOrientation | [浮点] 召唤的怪物的朝向。这是坐标系里的绝对方向,和召唤者无关。 |
nMinRandPos | [整数] 召唤怪物和自身的最小距离。详见说明 |
nUpHeight | [整数] 拉高的z坐标。 |
bGravity | [布尔] 是否受重力影响。暂时无用。 |
0 | 召唤怪物失败 |
其他 | 召唤的怪物的实例ID。当参数nCount大于1的时候,返回最后一个怪物的实例ID。如果要精确控制每个怪物的逻辑,则分多次调用。 |
int CreateMonsterByTripPoint | ( | FxCreature * | pActor, |
unsigned long | nTripPointID, | ||
unsigned long | nMonsterID, | ||
unsigned long | nCount = 1 , |
||
unsigned long | nRandomPos = 0 , |
||
unsigned long | nTime = 0xFFFFFFFF , |
||
float | fOrientation = 0.00f , |
||
unsigned long | nMinRandPos = 0 , |
||
unsigned long | nUpHeight = 2000 , |
||
bool | bGravity = true |
||
) |
在角色pActor所在的场景的指定转跳点nTripPointID创建怪物nMonsterID。
pActor | [角色] 创建怪物的角色对象。 |
nTripPointID | [整数] 转跳点ID。 |
nMonsterID | [整数] 怪物模版ID。 |
nCount | [整数] 创建怪物的个数,默认1。 |
nRandomPos | [整数] 位置随机的半径,默认0。 |
nTime | [整数] 怪物创建以后持续的时间,默认-1,表示永久。 |
fOrientation | [浮点] 朝向,弧度。 |
nMinRandPos | [整数] 位置随机的内半径,默认0。 |
nUpHeight | [整数] 拉高的z坐标。 |
bGravity | [布尔] 是否受重力影响。暂时无用。 |
0 | 召唤怪物失败 |
其他 | 召唤的怪物的实例ID。当参数nCount大于1的时候,返回最后一个怪物的实例ID。如果要精确控制每个怪物的逻辑,则分多次调用。 |
int CreateMonsterInScene | ( | FxScene * | pScene, |
int | nPosX, | ||
int | nPosY, | ||
int | nPosZ, | ||
unsigned long | nMonsterID, | ||
unsigned long | nCount = 1 , |
||
unsigned long | nRandomPos = 0 , |
||
unsigned long | nTime = 0xFFFFFFFF , |
||
float | fOrientation = 0.00f , |
||
unsigned long | nMinRandPos = 0 , |
||
unsigned long | nUpHeight = 2000 , |
||
bool | bGravity = true , |
||
unsigned long | nSrcID = 0 |
||
) |
在场景pScene的指定坐标[nPosX, nPosY, nPosZ]创建怪物nMonsterID。
pScene | [场景] 场景对象。 |
nPosX | [整数] X坐标。 |
nPosY | [整数] Y坐标。 |
nPosZ | [整数] Z坐标。 |
nMonsterID | [整数] 怪物模版ID。 |
nCount | [整数] 创建怪物的个数,默认1。 |
nRandomPos | [整数] 位置随机的半径,默认0。 |
nTime | [整数] 怪物创建以后持续的时间,默认-1,表示永久。 |
fOrientation | [浮点] 朝向,弧度。 |
nMinRandPos | [整数] 位置随机的内半径,默认0。 |
nUpHeight | [整数] 拉高的z坐标。 |
bGravity | [布尔] 是否受重力影响。暂时无用。 |
nSrcID | [整数] 创建者ID,默认非法。目前仅给子弹用。 |
0 | 召唤怪物失败 |
其他 | 召唤的怪物的实例ID。当参数nCount大于1的时候,返回最后一个怪物的实例ID。如果要精确控制每个怪物的逻辑,则分多次调用。 |
int CreateMonsterOnTarget | ( | FxCreature * | pActor, |
FxCreature * | pTarget, | ||
unsigned long | nMonsterID, | ||
unsigned long | nCount = 1 , |
||
unsigned long | nRandomPos = 400 , |
||
unsigned long | nTime = 0xFFFFFFFF , |
||
float | fOrientation = 0.00f , |
||
unsigned long | nUpHeight = 2000 , |
||
bool | bGravity = true |
||
) |
角色pActor在目标pTarget的位置的nRandomPos半径之内的范围内随机的位置召唤怪物,模板ID为nMonsterID,个数为nCount
pActor | [角色] 角色对象。 |
pTarget | [角色] 指定的目标。 |
nMonsterID | [整数] 怪物的模板ID。 |
nCount | [整数] 营救的个数,默认1。 |
nRandomPos | [整数] 自身为中心的随机位置的最大半径,默认400。如果是0,则严格在自身位置召唤。 |
nTime | [整数] 召唤出的怪物的生存时间,默认-1,即永久。 |
fOrientation | [浮点] 召唤的怪物的朝向。这是坐标系里的绝对方向,和召唤者无关。 |
nUpHeight | [整数] 拉高的z坐标。 |
bGravity | [布尔] 是否受重力影响。暂时无用。 |
0 | 召唤怪物失败 |
其他 | 召唤的怪物的实例ID。当参数nCount大于1的时候,返回最后一个怪物的实例ID。如果要精确控制每个怪物的逻辑,则分多次调用。 |
int CreateMonsterOnTargetEx | ( | FxScene * | pScene, |
FxCreature * | pTarget, | ||
unsigned long | nMonsterID, | ||
float | fAngle = 0.0f , |
||
float | fRad = 0.0f , |
||
unsigned long | nTime = 0xFFFFFFFF , |
||
float | fOrientation = 0.00f , |
||
unsigned long | nUpHeight = 2000 , |
||
bool | bGravity = true , |
||
unsigned long | nSrcID = 0 |
||
) |
角色pActor在目标pTarget的位置的由方向fAngle和半径fRad指定的极坐标位置召唤怪物,模板ID为nMonsterID,个数为nCount。
pScene | [场景] 场景对象。 |
pTarget | [生物] 召唤目标的对象 |
nMonsterID | [整数] 怪物模版ID。 |
fAngle | [浮点] 召唤目标的方向。 |
fRad | [浮点] 召唤目标的半径。 |
nTime | [整数] 怪物创建以后持续的时间,默认-1,表示永久。 |
fOrientation | [浮点] 朝向,弧度。 |
nUpHeight | [整数] 拉高的z坐标。 |
bGravity | [布尔] 是否受重力影响。暂时无用。 |
nSrcID | [整数] 创建者ID,默认非法。目前仅给子弹用。 |
0 | 召唤怪物失败 |
其他 | 召唤的怪物的实例ID。当参数nCount大于1的时候,返回最后一个怪物的实例ID。如果要精确控制每个怪物的逻辑,则分多次调用。 |
int CreateTaskMonster | ( | FxCreature * | pActor, |
unsigned long | nTaskID, | ||
unsigned long | nMonsterID, | ||
unsigned long | nRouteID | ||
) |
给角色pActor创建任务怪nMonsterID,任务为nTaskID,路径为nRouteID
pActor | [角色] 角色对象 |
nTaskID | [整数] 任务ID |
nMonsterID | [整数] 要创建的怪物模板ID |
nRouteID | [整数] 路径ID |
0 | 召唤怪物失败 |
unsigned long GetSceneGlobalNPC | ( | FxCreature * | pActor, |
unsigned long | nTemplateID | ||
) |
角色pActor根据模板ID,获取自己所在场景的该模板ID的全局NPC实例
pActor | [角色] 角色对象。 |
nTemplateID | [整数] 查询用的模板ID。 |
0 | 没有找到此模板的全局NPC对象 |
其他 | 此模板ID的全局NPC对象的ObjID |
unsigned long GetSceneGlobalNPC | ( | FxScene * | pScene, |
unsigned long | nTemplateID | ||
) |
根据场景对象,获取指定场景的该模板ID的全局NPC实例
pScene | [场景] 查找所在的场景 |
nTemplateID | [整数] 查询用的模板ID。 |
0 | 没有找到此模板的全局NPC对象 |
其他 | 此模板ID的全局NPC对象的ObjID |
int RegisterSceneGlobalNPC | ( | FxCreature * | pActor | ) |
角色pActor注册自己为场景级别的全局NPC
pActor | [角色] 角色对象。 |
0 | 注册失败 |
1 | 注册成功 |
int RescueMonster | ( | FxCreature * | pActor, |
unsigned long | nMonsterID, | ||
unsigned long | nCount = 1 , |
||
unsigned long | nRandomPos = 400 , |
||
unsigned long | nTime = 0xFFFFFFFF , |
||
float | fOrientation = 0.00f , |
||
unsigned long | nUpHeight = 2000 |
||
) |
角色pActor在自身位置nRandomPos半径内随机的位置以营救的方式召唤怪物,模板ID为nMonsterID,个数为nCount
pActor | [角色] 角色对象。 |
nMonsterID | [整数] 怪物的模板ID。 |
nCount | [整数] 营救的个数,默认1。 |
nRandomPos | [整数] 自身为中心的随机位置的最大半径,默认400。如果是0,则严格在自身位置召唤。 |
nTime | [整数] 召唤出的怪物的生存时间,默认-1,即永久。 |
fOrientation | [浮点] 召唤的怪物的朝向。这是坐标系里的绝对方向,和召唤者无关。 |
nUpHeight | [整数] 拉高的z坐标。 |
0 | 召唤怪物失败 |
其他 | 召唤的怪物的实例ID。当参数nCount大于1的时候,返回最后一个怪物的实例ID。如果要精确控制每个怪物的逻辑,则分多次调用。 |
int UnRegisterSceneGlobalNPC | ( | FxCreature * | pActor | ) |
角色pActor反注册自己为场景级别的全局NPC
pActor | [角色] 角色对象。 |
忽略 |