MovePet(CharIndex, PetPos, GiveCharIndex);
函数功能:
根据指定对象的宠物栏位置,将宠物转移到另一个对象的身上
操作参数:
| 参数名 | 是否必须 | 类型 | 说明 |
|---|---|---|---|
| CharIndex | 是 | int | 转移方对象索引 (人物) |
| PetPos | 是 | int | 宠物所在宠物栏位置 |
| GiveCharIndex | 是 | int | 被转移对象索引(人物) |
返回值:
| 返回值类型 | 成功 | 失败 |
|---|---|---|
| int | 被转移后的宠物栏位置 | -1 |
操作实例:
local PetPos = 1;Char.MovePet(CharIndex,PetPos,GiveCharIndex);local StringBuf = string.format("%s宠物栏%d的宠物,转移到了%s身上",Char.GetData(CharIndex,%对象_原名%),PetPos,Char.GetData(GiveCharIndex,%对象_原名%));print(StringBuf);
备注:
- 更多返回错误代码请看首页的错误代码描述
文档更新时间: 2025-08-07 16:01 作者:105493660