使用方法
Jump to navigation
Jump to search
此列表包含可用于的所有与 传送门2VScript 游戏引擎的松鼠 函数。 当游戏在工具模式 运行时可以使用
script_help
指令在控制台打印出来这些。
变量
实例 | 类型 | 描述 |
---|---|---|
Entities
|
CEntities
|
提供服务器中已生成实体的通道。 |
常量
实例 | 类型 | 值 |
---|---|---|
_charsize_
|
integer | 1 |
_floatsize_
|
integer | 4 |
_intsize_
|
integer | 4 |
_version_
|
string | "Squirrel 2.2.3 stable" |
RAND_MAX
|
integer | 32767 |
PI
|
float | 3.14159 |
类
CBaseEntity
这是实体的脚本句柄类。所有生成的实体都有一个使用此或其子类之一的脚本句柄。
游戏中的所有脚本句柄都可以从[[Zh/
- CEntities|Entities]]
self
关键字访问自己的脚本句柄。activator
和caller
关键字可以在函数调用时访问。 访问实体脚本, 可以使用
使用方法
函数
特征用法
描述
__KeyValueFromInt
void __KeyValueFromInt(string key, int value)
设置实体的某个Keyvalue 为整数。它只更改值, 但不会执行实体处理KeyValue所需的任何代码, 因此可能会产生意想不到的副作用。
__KeyValueFromFloat
void __KeyValueFromFloat(string key, float value)
设置实体的某个Keyvalue 为浮点数。它只更改值, 但不会执行实体处理KeyValue所需的任何代码, 因此可能会产生意想不到的副作用。
__KeyValueFromString
void __KeyValueFromString(string key, string value)
设置实体的某个Keyvalue 为字符串。它只更改值, 但不会执行实体处理KeyValue所需的任何代码, 因此可能会产生意想不到的副作用。
__KeyValueFromVector
void __KeyValueFromVector(string key, Vector value)
设置实体的某个Keyvalue 为[[Zh/
- Vector|向量(或矢量)]]
。它只更改值, 但不会执行实体处理KeyValue所需的任何代码, 因此可能会产生意想不到的副作用。
ConnectOutput
void CBaseEntity::ConnectOutput(string output, string func_name)
添加一个I/O连接, 当指定的输出触发时, 该连接将调用指定的函数。
Destroy
void CBaseEntity::Destroy()
消灭这个实体。
DisconnectOutput
void CBaseEntity::DisconnectOutput(string output, string func_name)
从I/O事件中删除连接的脚本函数。
EmitSound
void CBaseEntity::EmitSound(string sound)
从该实体处播放一段声音。
EyePosition
Vector CBaseEntity::EyePosition()
获得眼睛位置绝对坐标的向量。
FirstMoveChild
handle CBaseEntity::FirstMoveChild()
如果处于层次结构中,则获取则检索第一个(移动)实体的子级。
GetAngles
Vector CBaseEntity::GetAngles()
获得实体转换为向量的俯仰、水平、横滚的角度数值。
GetAngularVelocity
Vector CBaseEntity::GetAngularVelocity()
获取局部角速度-返回俯仰、水平、横滚的向量。
GetBoundingMaxs
Vector CBaseEntity::GetBoundingMaxs()
获取一个以对象为中心的最大边框的向量。
GetBoundingMins
Vector CBaseEntity::GetBoundingMins()
获取一个以对象为中心的最小边框的向量。
GetCenter
Vector CBaseEntity::GetCenter()
获取对象中心的向量-绝对坐标。
GetClassname
string CBaseEntity::GetClassname()
获取此实体的类名。
GetForwardVector
Vector CBaseEntity::GetForwardVector()
获取实体的正向向量(+X)。
GetHealth
int CBaseEntity::GetHealth()
返回实体当前血量 。
GetLeftVector
Vector CBaseEntity::GetLeftVector()
获取实体的左向量。
GetMaxHealth
int CBaseEntity::GetMaxHealth()
返回实体最大血量。
GetModelKeyValues
handle CBaseEntity::GetModelKeyValues()
获取此实体模型上的键值类实例。
GetModelName
string CBaseEntity::GetModelName()
获取该实体模型名称。
GetMoveParent
handle CBaseEntity::GetMoveParent()
如果处于层次结构中, 则检索实体的父级。
GetName
string CBaseEntity::GetName()
获取此实体的Targetname。
GetOrigin
Vector CBaseEntity::GetOrigin()
返回此实体的局部原点位置坐标。
GetOwner
handle CBaseEntity::GetOwner()
获取此实体的所有者。
GetPreTemplateName
string CBaseEntity::GetPreTemplateName()
将实体名称从模板唯一装饰(&001后缀)中删除。
GetRootMoveParent
handle CBaseEntity::GetRootMoveParent()
如果处于层次结构中, 则向上遍历层次结构以查找根父级
GetScriptId
string CBaseEntity::GetScriptId()
检索用于引用脚本系统中实体的唯一标识符。
GetScriptScope
handle CBaseEntity::GetScriptScope()
检索与实体关联的脚本端数据。
GetSoundDuration
float CBaseEntity::GetSoundDuration(string, string)
以浮点数返回声音的持续时间。接受声音名称和可选的actormodelname。
GetTeam
int CBaseEntity::GetTeam()
找到这个实体所在的队伍。
GetUpVector
Vector CBaseEntity::GetUpVector()
获取实体的向上向量(+Z)。
GetVelocity
Vector CBaseEntity::GetVelocity()
获取实体的速度。请注意,这会读取QPhysics 速度值, 因此它仅适用于玩家、NPC和移动画笔实体。VPhysics对象的速度始终为零, 一种解决方法是记录多个帧上的位置, 并手动推导速度。
IsValid
bool CBaseEntity::IsValid()
如果此实体有效, 则返回true。
NextMovePeer
handle CBaseEntity::NextMovePeer()
返回同一继承层次结构中的下一个实体。
PrecacheSoundScript
void CBaseEntity::PrecacheSoundScript(string)
预先加载一个声音以供以后播放, 应该在Preche()钩子函数中调用。
SetAbsOrigin
void CBaseEntity::SetAbsOrigin(Vector)
将实体传送到此世界位置。
SetAngles
void CBaseEntity::SetAngles(float, float, float)
设置实体俯仰、水平、横滚。
SetAngularVelocity
void CBaseEntity::SetAngularVelocity(float, float, float)
设置局部角速度-浮点数的俯仰、水平、横滚速度。
SetForwardVector
void CBaseEntity::SetForwardVector(Vector)
将实体的正向(+X)向量。
SetHealth
void CBaseEntity::SetHealth(int)
设置实体当前的血量 。
SetMaxHealth
void CBaseEntity::SetMaxHealth(int)
设置实体最大血量。
SetModel
void CBaseEntity::SetModel(string)
更改实体的模型, 这可用于更改prop_weighted_cube或其他类似实体的模型。模型必须预加载, 可以通过预先放置在地图的其他位置来完成。
SetOrigin
void CBaseEntity::SetOrigin(Vector)
将此实体传送到给定位置。
SetOwner
void CBaseEntity::SetOwner(handle)
设置实体的所有者。
SetSize
void CBaseEntity::SetSize(Vector, Vector)
设置边界框大小。(比如func_brush或trigger_multiple)
SetTeam
void CBaseEntity::SetTeam(int)
设置此实体所在的队伍。
SetVelocity
void CBaseEntity::SetVelocity(Vector)
设置局部速度。请注意,这会设置QPhysics 速度值,因此它仅适用于玩家、NPC和移动画笔实体。对于VPhysics对象,这没有影响。
ValidateScriptScope
bool CBaseEntity::ValidateScriptScope()
确保已创建实体的脚本作用域。 在分配给实体的作用域之前, 应该调用此函数。
entindex
int CBaseEntity::entindex()
返回实体的索引值。
CBaseAnimating
继承 CBaseEntity
用于为道具等实体设置动画的脚本句柄类。
使用方法
函数
签名
描述
GetAttachmentAngles
Vector CBaseAnimating ::GetAttachmentAngles(int id)
获取附件ID的角度(p,y,r向量)。
GetAttachmentOrigin
Vector CBaseAnimating ::GetAttachmentOrigin(int id)
获取附件ID的原始向量。
GetObjectScaleLevel
int CBaseAnimating ::GetObjectScaleLevel()
获取实体的缩放级别。
IsSequenceFinished
bool CBaseAnimating ::IsSequenceFinished()
检查主序列是否播放完毕。
LookupAttachment
int CBaseAnimating ::LookupAttachment(string)
获取命名附件的ID。
SetBodygroup
void CBaseAnimating ::SetBodygroup(int group, int index)
设置身体组。group是目标组的索引,index是要使用的部位索引。
CBaseFlex
使用方法
函数
签名
描述
GetCurrentScene
handle CBaseFlex ::GetCurrentScene()
返回最早激活的场景实体实例(如果有)。
GetSceneByIndex
handle CBaseFlex ::GetSceneByIndex(int)
返回指定索引的场景实体实例。
CBasePlayer
使用方法
函数
签名
描述
IsNoclipping
bool CBasePlayer ::IsNoclipping()
如果玩家处于穿墙模式则返回true。
CEntities
脚本实例: Entities
用于查找和迭代游戏中实体的脚本接口。
要迭代一组实体,请在适当的方法中将null
传递给"previous"参数以开始迭代,或引用先前找到的实体以继续搜索。示例:
//第一种方式
local ent = null; //变量名"ent"可自定义
while(ent = Entities.FindByName(ent, "entityname")) //注意使用"="而非"=="
{
//... //每次迭代时"ent"有效则执行此处代码
}
//第二种方式
for(local ent;ent = Entities.FindByName(ent, "entityname");) //注意分号位置
{
//... //每次迭代时"ent"有效则执行此处代码
}
使用方法
函数
签名
描述
CreateByClassname
handle CEntities ::CreateByClassname(string)
通过类名创建实体
FindByClassname
handle CEntities ::FindByClassname(handle start_ent, string classname)
按类名查找实体。传递'null'开始迭代,或引用先前找到的实体继续搜索
FindByClassnameNearest
handle CEntities ::FindByClassnameNearest(string classname, Vector loc, float radius)
查找距离某点最近的指定类名实体
FindByClassnameWithin
handle CEntities ::FindByClassnameWithin(handle start_ent, string classname, Vector loc, float radius)
查找半径内的指定类名实体。传递'null'开始迭代
FindByModel
handle CEntities ::FindByModel(handle start_ent, string model)
按模型名查找实体。传递'null'开始迭代
FindByName
handle CEntities ::FindByName(handle start_ent, string targetname)
按名称(支持通配符)查找实体。传递'null'开始迭代
FindByNameNearest
handle CEntities ::FindByNameNearest(string targetname, Vector loc, float radius)
查找距离某点最近的指定名称实体
FindByNameWithin
handle CEntities ::FindByNameWithin(handle, string, Vector loc, float radius)
查找半径内的指定名称实体。传递'null'开始迭代
FindByTarget
handle CEntities ::FindByTarget(handle start_ent, string targetname)
查找具有特定target
键值的实体。传递'null'开始迭代
FindInSphere
handle CEntities ::FindInSphere(handle start_ent, Vector loc, float radius)
查找半径内的实体。传递'null'开始迭代
First
handle CEntities ::First()
开始实体列表迭代。等同于Next(null)
Next
handle CEntities ::Next(handle)
继续迭代,需提供先前找到的实体引用
CEnvEntityMaker
继承 CBaseEntity
脚本句柄类是env_entity_maker 。
使用方法
函数
签名
描述
SpawnEntity
void CEnvEntityMaker ::SpawnEntity()
在maker位置创建实体
SpawnEntityAtEntityOrigin
void CEnvEntityMaker ::SpawnEntityAtEntityOrigin(handle)
在指定实体位置创建实体
SpawnEntityAtLocation
void CEnvEntityMaker ::SpawnEntityAtLocation(Vector, Vector)
在指定位置和欧拉角(pitch,yaw,roll)创建实体
SpawnEntityAtNamedEntityOrigin
void CEnvEntityMaker ::SpawnEntityAtNamedEntityOrigin(string)
在命名实体位置创建实体
CLinkedPortalDoor
[待完善]
使用方法
函数
签名
描述
GetPartnerInstance
handle CLinkedPortalDoor ::GetPartnerInstance()
获取门链接伙伴的实例句柄
GetPartnername
string CLinkedPortalDoor ::GetPartnername()
返回门的伙伴名称
CPlayerVoiceListener
[待完善]
使用方法
函数
签名
描述
GetPlayerSpeechDuration
float CPlayerVoiceListener ::GetPlayerSpeechDuration(int)
返回玩家持续说话的秒数
IsPlayerSpeaking
bool CPlayerVoiceListener ::IsPlayerSpeaking(int)
返回指定玩家是否正在说话
CPortal_Player
[待完善]
使用方法
函数
签名
描述
GetWheatleyMonitorDestructionCount
int CPortal_Player ::GetWheatleyMonitorDestructionCount()
获取玩家摧毁Wheatley显示器的数量
IncWheatleyMonitorDestructionCount
void CPortal_Player ::IncWheatleyMonitorDestructionCount()
增加玩家摧毁Wheatley显示器的计数
TurnOffPotatos
void CPortal_Player ::TurnOffPotatos()
关闭Potatos材质光源
TurnOnPotatos
void CPortal_Player ::TurnOnPotatos()
开启Potatos材质光源
CPropLinkedPortalDoor
[待完善]
使用方法
函数
签名
描述
GetPartnerInstance
handle CPropLinkedPortalDoor ::GetPartnerInstance()
获取门链接伙伴的实例句柄
GetPartnername
string CPropLinkedPortalDoor ::GetPartnername()
返回门的伙伴名称
CSceneEntity
继承 CBaseEntity
使用方法
函数
签名
描述
AddBroadcastTeamTarget
void CSceneEntity::AddBroadcastTeamTarget(int)
通过索引将团队添加到广播列表
EstimateLength
float CSceneEntity::EstimateLength()
返回场景长度(秒)
FindNamedEntity
handle CSceneEntity::FindNamedEntity(string)
根据实体引用(如!target)从场景对象获取实际实体
IsPaused
bool CSceneEntity::IsPaused()
检查当前场景是否暂停
IsPlayingBack
bool CSceneEntity::IsPlayingBack()
检查当前场景是否正在播放
LoadSceneFromString
bool CSceneEntity::LoadSceneFromString(string, string)
根据虚拟场景名和vcd字符串加载场景
RemoveBroadcastTeamTarget
void CSceneEntity::RemoveBroadcastTeamTarget(int)
通过索引从广播列表移除团队
CScriptKeyValues
模型$keyvalues块的脚本句柄表示。
子键是相同类的实例。
使用方法
函数
签名
描述
FindKey
handle CScriptKeyValues::FindKey(string)
根据键名查找关联的KeyValues对象
GetFirstSubKey
handle CScriptKeyValues::GetFirstSubKey()
获取第一个子键对象
GetKeyBool
bool CScriptKeyValues::GetKeyBool(string)
获取键关联的布尔值
GetKeyFloat
float CScriptKeyValues::GetKeyFloat(string)
获取键关联的浮点值
GetKeyInt
int CScriptKeyValues::GetKeyInt(string)
获取键关联的整数值
GetKeyString
string CScriptKeyValues::GetKeyString(string)
获取键关联的字符串值
GetNextKey
handle CScriptKeyValues::GetNextKey()
获取子键组中的下一个键对象
IsKeyEmpty
bool CScriptKeyValues::IsKeyEmpty(string)
检查键名是否没有值
ReleaseKeyValues
void CScriptKeyValues::ReleaseKeyValues()
释放根KeyValues对象内容
CTriggerCamera
继承 CBaseEntity
使用方法
函数
签名
描述
GetFov
int CTriggerCamera::GetFov()
获取相机当前FOV设置(整数)
SetFov
void CTriggerCamera::SetFov(int, float)
设置相机FOV(整数角度)和FOV变化率(浮点)
Math
内置的Squirrel数学库。
函数
签名
描述
abs
int abs(float x)
返回x
的整数绝对值
acos
float acos(float x)
返回x
的反余弦值
asin
float asin(float x)
返回x
的反正弦值
atan
float atan(float x)
返回x
的反正切值
atan2
float atan2(float x, float y)
返回x/y
的反正切值
ceil
float ceil(float x)
返回大于等于x
的最小整数值
cos
float cos(float x)
返回x
的余弦值
exp
float exp(float x)
返回x
的指数值(e^x
)
fabs
float fabs(float x)
返回x
的浮点绝对值
floor
float floor(float x)
返回小于等于x
的最大整数值
log
float log(float x)
返回x
的自然对数
log10
float log10(float x)
返回x
的以10为底对数
pow
float pow(float x, float y)
返回x
的y
次幂
rand
int rand()
返回0到RAND_MAX
间的伪随机整数
sin
float sin(float x)
返回x
的正弦值
sqrt
float sqrt(float x)
返回x
的平方根
srand
void srand(float seed)
设置伪随机数生成器的种子
tan
float tan(float x)
返回x
的正切值
向量
表示一个x/y/z位置,被许多函数返回/传递。它以3个x/y/z位置作为参数。
可以对向量应用一些数学运算 - 任意两个向量之间的+/-,以及向量 * 数字
(仅限此顺序)。所有三种运算都返回另一个向量。其他数学运算通过方法调用完成:
使用方法
函数
签名
描述
Cross
Vector Vector::Cross(Vector other)
返回向量叉积 - this × other
Dot
float Vector::Dot(Vector other)
返回向量点积 - this · other
Length
float Vector::Length()
返回与原点距离
Length2D
float Vector::Length2D()
返回与原点距离(忽略Z轴)
LengthSqr
float Vector::LengthSqr()
返回与原点距离的平方(计算更快,无需平方根)
Length2DSqr
float Vector::Length2DSqr()
返回与原点距离的平方(忽略Z轴,计算更快)
Norm
float Vector::Norm()
将向量长度归一化为1,并返回原长度
ToKVString
string Vector::ToKVString()
返回"X Y Z"格式字符串
其他函数
函数
签名
描述
Assert
void Assert(exp, string message = null)
如果exp为false则抛出异常(可选消息)
CreateProp
handle CreateProp(string classname, Vector origin, string modelname, int activity)
创建道具(类应为prop_physics风格实体)
CreateSceneEntity
handle CreateSceneEntity(string)
创建用于播放指定场景的场景实体
DebugDrawBox
void DebugDrawBox(Vector origin, Vector mins, Vector maxs, int r, int g, int b, int alpha, float duration)
绘制调试方框(需开发者模式),位于origin
,尺寸为mins
/maxs
,持续duration
秒(-1.0为1帧),颜色范围0-255
DebugDrawLine
void DebugDrawLine(Vector start, Vector end, int r, int g, int b, bool hitTest, float duration)
绘制调试线(需开发者模式),持续duration
秒,颜色范围0-255
DoIncludeScript
bool DoIncludeScript(string filename, table scope)
在scope
作用域执行脚本文件"scripts/vscripts/" + filename
(可省略.nut
扩展名)
IncludeScript
bool IncludeScript(string filename, table scope = null)
在scope
作用域(默认为this
)执行脚本文件
DoEntFire
void DoEntFire(string target, string action, string value, float delay, handle activator, handle caller)
生成实体I/O事件
EntFire
function EntFire(target, action, value, delay, activator)
生成实体I/O事件(value/delay/activator可选)
EntFireByHandle
void EntFireByHandle(handle target, string action, string value, float delay, handle activator, handle caller)
生成实体I/O事件(第一个参数为实体实例)
FrameTime
float FrameTime()
获取服务器上一帧耗时
GetDeveloperLevel
int GetDeveloperLevel()
获取'developer'级别
GetMapIndexInPlayOrder
int GetMapIndexInPlayOrder()
获取创意工坊地图的游玩顺序索引(非工坊地图返回-2)
GetMapName
string GetMapName()
获取当前地图名称
GetNumMapsPlayed
int GetNumMapsPlayed()
获取玩家已游玩的创意工坊地图数量
GetPlayerSilenceDuration
float GetPlayerSilenceDuration(int player_index)
获取指定玩家麦克风静默时长
IsMultiplayer
bool IsMultiplayer()
检查是否为多人游戏
LoopSinglePlayerMaps
bool LoopSinglePlayerMaps()
检查loopsingleplayermaps
cvar是否启用(多人游戏仍有效)
RandomFloat
float RandomFloat(float min, float max)
生成范围内随机浮点数(包含边界)
RandomInt
int RandomInt(int min, int max)
生成范围内随机整数(包含边界)
RecordAchievementEvent
void RecordAchievementEvent(string name, int player_index)
解锁成就或增加进度
RequestMapRating
void RequestMapRating()
在创意工坊地图弹出评分对话框
RetrieveNativeSignature
void RetrieveNativeSignature(string nativeFunction)
[待完善]
SendToConsole
void SendToConsole(string command)
向控制台发送命令(多人游戏中视为主机命令)
SetDucking
void SetDucking(string, string, float)
设置音频闪避通道级别
SetMapAsPlayed
int SetMapAsPlayed()
将当前地图添加到游玩顺序(非工坊地图返回-2)
ShowMessage
void ShowMessage(string)
向所有客户端显示HUD消息
Time
float Time()
获取当前服务器时间
TraceLine
float TraceLine(Vector start, Vector end, handle ignored_ent)
给定起点/终点和忽略实体,返回击中世界的线段比例(不检测实体)
UniqueString
string UniqueString(string suffix = "")
生成脚本VM生命周期内唯一的字符串(可选前缀)
DoUniqueString
string DoUniqueString(string suffix)
生成唯一字符串(功能同UniqueString
)
__ReplaceClosures
void __ReplaceClosures(function script, table scope)
script_reload_
服务器命令调用的内部函数
仅限单人模式
这些函数只能在单人游戏中使用,多人游戏中使用可能导致错误。
函数
签名
描述
GetPlayer
handle GetPlayer()
获取玩家实体
GivePlayerPortalgun
void GivePlayerPortalgun()
给予玩家仅限蓝色传送门枪
PrecacheMovie
void PrecacheMovie(string)
预加载指定电影(仅在地图生成时的'Precache'函数中有效)
ScriptShowHudMessageAll
void ScriptShowHudMessageAll(string, float)
显示居中文本消息(持续指定秒数)
ScriptSteamShowURL
bool ScriptSteamShowURL(string)
在Steam叠加层显示指定URL(需完整地址如http://www.steamgames.com/)
TryDLC1InstalledOrCatch
void TryDLC1InstalledOrCatch()
如果未安装Peer Review DLC则抛出异常(当前PC版本中无效)
UpgradePlayerPortalgun
void UpgradePlayerPortalgun()
将玩家传送门枪升级为可发射橙色传送门
UpgradePlayerPotatogun
void UpgradePlayerPotatogun()
将玩家传送门枪升级为带PotatOS的橙色传送门枪
仅限多人模式
这些函数只能在多人游戏中使用,单人游戏中使用可能导致错误。
函数
签名
描述
AddBranchLevelName
void AddBranchLevelName(int, string)
向指定分支添加关卡
注意:合作地图中必须至少调用一次
AddCoopCreditsName
void AddCoopCreditsName(string)
向合作模式演职员表添加名称
AddGladosSpokenFlags
void AddGladosSpokenFlags(int, int)
添加特定对话行的位标志(按会话追踪)
CoopGladosBlowUpBots
void CoopGladosBlowUpBots()
摧毁两个机器人并阻止重生
CoopGetNumPortalsPlaced
int CoopGetNumPortalsPlaced()
获取玩家已放置的传送门数量
CoopGetLevelsCompletedThisBranch
int CoopGetLevelsCompletedThisBranch()
获取当前分支中已完成的关卡数
CoopGetBranchTotalLevelCount
int CoopGetBranchTotalLevelCount()
获取当前分支的关卡总数
CoopSetCameFromLastDLCMap
void CoopSetCameFromLastDLCMap(bool)
设置玩家是否来自最后的合作DLC地图
CoopSetMapRunTime
void CoopSetMapRunTime(float runLength)
设置完成合作地图的时间(可能与Triple Crown成就相关)
GetBluePlayerIndex
int GetBluePlayerIndex()
获取蓝色玩家索引
GetCameFromLastDLCMap
bool GetCameFromLastDLCMap()
检查是否来自最后的合作DLC地图
GetCoopBranchLevelIndex
int GetCoopBranchLevelIndex(int)
获取指定分支的当前选定关卡索引
GetCoopSectionIndex
int GetCoopSectionIndex()
获取合作玩家选择加载的章节索引
GetGladosSpokenFlags
int GetGladosSpokenFlags(int)
获取特定对话行的位标志
GetHaveSeenDLCTubesReveal
bool GetHaveSeenDLCTubesReveal()
检查玩家是否已观看DLC管道揭示
GetHighestActiveBranch
int GetHighestActiveBranch()
获取中心可用的最高分支
GetNumPlayersConnected
int GetNumPlayersConnected()
获取已连接玩家数(通常为2)
GetOrangePlayerIndex
int GetOrangePlayerIndex()
获取橙色玩家索引
GetPlayerDeathCount
int GetPlayerDeathCount(int player)
获取指定玩家在会话中的死亡次数
IsBranchComplete
bool IsBranchComplete(int course)
检查分支所有关卡是否已完成
IsLevelComplete
bool IsLevelComplete(int course, int level)
检查指定分支关卡是否已完成
IsLocalSplitScreen
bool IsLocalSplitScreen()
检查是否为本地分屏模式
IsPlayerBranchComplete
bool IsPlayerBranchComplete(int player, int course)
检查指定玩家是否完成分支所有关卡
IsPlayerLevelComplete
bool IsPlayerLevelComplete(int, int, int)
检查指定玩家是否完成特定分支关卡
MarkMapComplete
void MarkMapComplete(string)
标记地图为已完成(双方玩家)
NotifySpeedRunSuccess
void NotifySpeedRunSuccess(int runLength, string mapname)
通知客户端速通成功(用于Triple Crown成就)
SaveMPStatsData
void SaveMPStatsData()
保存多人游戏统计信息(记分牌)
SetHaveSeenDLCTubesReveal
void SetHaveSeenDLCTubesReveal()
标记玩家已观看DLC管道揭示
另见