| scardoc;RuleSystem |
| Functions |
| Rule_Add( LuaFunction f , Table OPT_data, EGroupID OPT_group ) | |
|
添加一个每帧执行的规则。【功能:添加每帧执行的规则】 Returns the ID of the rule just added. |
|
| Source: [E:\P4Share\engine\assets\engine\scar\rulesystem.scar] (25) | |
| Rule_AddEGroupEvent( LuaFunction rule, EGroupID egroup, Integer eventtype ) | |
|
当'eventType'类型的事件在'egroup'中的实体上发生时,添加一个要执行的规则。【功能:为实体组添加事件触发规则】 Event types are: GE_EntityKilled, GE_EntityParadropComplete, GE_EntityCommandIssued, GE_ProjectileFired, GE_AbilityExecuted, GE_SpawnActionComplete |
|
| Source: [E:\P4Share\engine\assets\engine\scar\rulesystem.scar] (212) | |
| Rule_AddEntityEvent( LuaFunction rule, EntityID entity, Integer eventtype ) | |
|
当'eventType'类型的事件在'entity'上发生时,添加一个要执行的规则。【功能:为单个实体添加事件触发规则】 Event types are: GE_EntityKilled, GE_EntityParadropComplete, GE_EntityCommandIssued, GE_ProjectileFired, GE_AbilityExecuted, GE_SpawnActionComplete |
|
| Source: [E:\P4Share\engine\assets\engine\scar\rulesystem.scar] (200) | |
| Rule_AddEventFilter_EntityBlueprint( LuaFunction rule, RuleFilterContext context, RuleFilterOperator op, Array includeTypes, Array excludeTypes ) | |
|
为给定规则添加过滤器,使事件仅在以下情况下触发:上下文指向的实体的蓝图在includeTypes中且不在excludeTypes中。【功能:添加实体蓝图过滤器】 Valid contexts are dependent on the event this filter is applied to. When multiple filters exist op defines how the result of the previous filter is combined with this filter. Blueprint can be either a PBG or the name of a type (where in it acts the same as Rule_AddEventFilter_EntityType). |
|
| Source: [E:\P4Share\engine\assets\engine\scar\rulesystem.scar] (272) | |
| Rule_AddEventFilter_EntityPlayerOwner( LuaFunction rule, RuleFilterContext context, RuleFilterOperator op, Array includeTypes, Array excludeTypes ) | |
|
为给定规则添加过滤器,使事件仅在以下情况下触发:上下文指向的实体由includeTypes中的玩家拥有,且不在excludeTypes中。【功能:添加实体所属玩家过滤器】 Valid contexts are dependent on the event this filter is applied to. When multiple filters exist op defines how the result of the previous filter is combined with this filter. |
|
| Source: [E:\P4Share\engine\assets\engine\scar\rulesystem.scar] (264) | |
| Rule_AddEventFilter_EntityType( LuaFunction rule, RuleFilterContext context, RuleFilterOperator op, Array includeTypes, Array excludeTypes ) | |
|
为给定规则添加过滤器,使事件仅在以下情况下触发:上下文指向的实体类型在includeTypes中且不在excludeTypes中。【功能:添加实体类型过滤器】 Valid contexts are dependent on the event this filter is applied to. When multiple filters exist op defines how the result of the previous filter is combined with this filter. |
|
| Source: [E:\P4Share\engine\assets\engine\scar\rulesystem.scar] (248) | |
| Rule_AddEventFilter_StateModelBool( LuaFunction rule, RuleFilterContext context, RuleFilterOperator op, Array includeTypes, Array excludeTypes ) | |
|
为给定规则添加过滤器,使事件仅在以下情况下触发:上下文指向的实体至少有一个来自includeTypes的true状态模型值,且没有来自excludeTypes的值。【功能:添加状态模型布尔值过滤器】 Valid contexts are dependent on the event this filter is applied to. When multiple filters exist op defines how the result of the previous filter is combined with this filter. |
|
| Source: [E:\P4Share\engine\assets\engine\scar\rulesystem.scar] (256) | |
| Rule_AddGlobalEvent( LuaFunction rule, Integer eventtype ) | |
|
当'eventType'类型的事件发生时添加一个要执行的规则,无论事件来源如何。【功能:添加全局事件触发规则】 Event types are: GE_PlayerBeingAttacked |
|
| Source: [E:\P4Share\engine\assets\engine\scar\rulesystem.scar] (236) | |
| Rule_AddInterval( LuaFunction f, Real/Table interval , Table OPT_data, EGroupID OPT_group ) | |
|
添加一个要执行的规则。可以包含启动延迟、规则调用之间的间隔以及规则被调用的次数。【功能:添加定时间隔执行规则】 interval can be a number (the interval between subsequent rule calls) or a table with the keys: "delay", "interval" and "count". Returns the ID of the rule just added. |
|
| Source: [E:\P4Share\engine\assets\engine\scar\rulesystem.scar] (82) | |
| Rule_AddIntervalWithDelay( ) | |
|
Rule_AddInterval的新改进版本,初始延迟仅为'delay',而不是'delay + interval'。【功能:添加带延迟的定时间隔执行规则】 |
|
| Source: [E:\P4Share\engine\assets\engine\scar\rulesystem.scar] (65) | |
| Rule_AddOneShot( LuaFunction rule, Real OPT_delay, Table OPT_data, EGroupID OPT_group ) | |
|
添加一个在'delay'秒后执行一次的规则。【功能:添加一次性延迟执行规则】 Returns the ID of the rule just added. |
|
| Source: [E:\P4Share\engine\assets\engine\scar\rulesystem.scar] (114) | |
| Rule_AddPlayerEvent( LuaFunction rule, PlayerID player, Integer eventtype ) | |
|
当'eventType'类型的事件在'player'上发生时,添加一个要执行的规则。【功能:为玩家添加事件触发规则】 Event types are: GE_PlayerBeingAttacked, GE_PlayerCommandIssued, GE_AbilityExecuted, GE_UpgradeComplete, GE_ConstructionComplete, GE_BuildItemComplete, GE_PlayerKilled, GE_SpawnActionComplete, GE_AIPlayer_EncounterNotification |
|
| Source: [E:\P4Share\engine\assets\engine\scar\rulesystem.scar] (224) | |
| Rule_AddSGroupEvent( LuaFunction rule, SGroupID sgroup, Integer eventtype ) | |
|
当'eventType'类型的事件在'sgroup'中的小队上发生时,添加一个要执行的规则。【功能:为小队组添加事件触发规则】 Event types are: GE_SquadKilled, GE_SquadPinned, GE_SquadParadropComplete, GE_SquadCommandIssued, GE_AbilityExecuted, GE_SpawnActionComplete |
|
| Source: [E:\P4Share\engine\assets\engine\scar\rulesystem.scar] (189) | |
| Rule_AddSquadEvent( LuaFunction rule, SquadID squad, Integer eventtype ) | |
|
当'eventType'类型的事件在'squad'上发生时,添加一个要执行的规则。【功能:为小队添加事件触发规则】 Event types are: GE_SquadKilled, GE_SquadPinned, GE_SquadParadropComplete, GE_SquadCommandIssued, GE_AbilityExecuted, GE_SpawnActionComplete |
|
| Source: [E:\P4Share\engine\assets\engine\scar\rulesystem.scar] (177) | |
| Rule_ChangeInterval( LuaFunction rule, Real interval ) | |
|
更改所有具有Lua函数f的规则的'interval'间隔秒数。【功能:修改规则执行间隔】 |
|
| Source: [E:\P4Share\engine\assets\engine\scar\rulesystem.scar] (134) | |
| Rule_ChangeIntervalWithID( Integer id, Real interval ) | |
|
更改具有指定id的现有规则的'interval'间隔秒数。【功能:通过ID修改规则执行间隔】 |
|
| Source: [E:\P4Share\engine\assets\engine\scar\rulesystem.scar] (141) | |
| Rule_EnterProximity( Function f, Boolean all, EGroupID who, Marker where, Integer OPT_range, Boolean OPT_recur, Table OPT_data ) | |
|
当一个组(SGroup/EGroup)足够接近某个位置时触发。【功能:进入范围触发规则】 |
|
| Source: [E:\P4Share\engine\assets\engine\scar\rulesystem.scar] (481) | |
| Rule_Exists( LuaFunction rule ) | |
|
测试具有Lua函数f的规则当前是否处于活动状态。【功能:检查规则是否存在】 |
|
| Source: [E:\P4Share\engine\assets\engine\scar\rulesystem.scar] (391) | |
| Rule_ExistsWithID( Integer id ) | |
|
测试具有指定id的规则当前是否处于活动状态。仅适用于时间规则。【功能:通过ID检查规则是否存在】 |
|
| Source: [E:\P4Share\engine\assets\engine\scar\rulesystem.scar] (404) | |
| Rule_ExitProximity( Function f, Boolean all, EGroupID who, Marker where, Integer OPT_range, Boolean OPT_recur, Table OPT_data ) | |
|
当一个组(SGroup/EGroup)离某个位置足够远时触发(该组必须先进入范围才能触发此规则)。【功能:离开范围触发规则】 |
|
| Source: [E:\P4Share\engine\assets\engine\scar\rulesystem.scar] (488) | |
| Rule_GetInterval( LuaFunction rule ) | |
|
获取所有具有Lua函数f的规则的'interval'间隔秒数。【功能:获取规则执行间隔】 |
|
| Source: [E:\P4Share\engine\assets\engine\scar\rulesystem.scar] (148) | |
| Rule_GetIntervalWithID( Integer id ) | |
|
获取具有指定id的现有规则的'interval'间隔秒数。【功能:通过ID获取规则执行间隔】 |
|
| Source: [E:\P4Share\engine\assets\engine\scar\rulesystem.scar] (155) | |
| Rule_GetTime( LuaFunction rule ) | |
|
获取所有具有Lua函数f的规则的'timer'计时器秒数。【功能:获取规则计时器时间】 |
|
| Source: [E:\P4Share\engine\assets\engine\scar\rulesystem.scar] (162) | |
| Rule_GetTimeWithID( Integer id ) | |
|
获取具有指定id的现有规则的'timer'计时器秒数。【功能:通过ID获取规则计时器时间】 |
|
| Source: [E:\P4Share\engine\assets\engine\scar\rulesystem.scar] (169) | |
| Rule_GroupCount( Function f, EGroupID group, Comparison comparison, Integer value, Boolean recur, Table data ) | |
|
比较操作为IS_LESS_THAN、IS_LESS_THAN_OR_EQUAL、IS_EQUAL、IS_NOT_EQUAL、IS_GREATER_THAN或IS_GREATER_THAN_OR_EQUAL之一。当组中的对象数量通过比较操作与值比较为true时触发。【功能:组数量比较触发规则】 |
|
| Source: [E:\P4Share\engine\assets\engine\scar\rulesystem.scar] (502) | |
| Rule_Pause( LuaFunction f ) | |
|
暂停所有具有Lua函数的规则。【功能:暂停指定规则】 |
|
| Source: [E:\P4Share\engine\assets\engine\scar\rulesystem.scar] (450) | |
| Rule_PauseAll( Number / Table groupsToIgnore ) | |
|
暂停所有当前活动的规则。忽略不可暂停的规则。【功能:暂停所有规则】 |
|
| Source: [E:\P4Share\engine\assets\engine\scar\rulesystem.scar] (416) | |
| Rule_PauseWithID( Integer id ) | |
|
暂停所有具有指定id的规则。仅适用于时间规则。【功能:通过ID暂停规则】 |
|
| Source: [E:\P4Share\engine\assets\engine\scar\rulesystem.scar] (466) | |
| Rule_Refresh( ) | |
|
刷新所有时间规则和事件规则。【功能:刷新所有规则】 |
|
| Source: [E:\P4Share\engine\assets\engine\scar\rulesystem.scar] (383) | |
| Rule_Remove( LuaFunction rule ) | |
|
移除所有当前活动的具有Lua函数f的规则(不会移除任何事件规则)。【功能:移除指定规则】 |
|
| Source: [E:\P4Share\engine\assets\engine\scar\rulesystem.scar] (337) | |
| Rule_RemoveAll( ) | |
|
终止所有规则。【功能:移除所有规则】 |
|
| Source: [E:\P4Share\engine\assets\engine\scar\rulesystem.scar] (356) | |
| Rule_RemoveEGroupEvent( LuaFunction rule, EGroupID egroup ) | |
|
移除'egroup'中实体的活动事件规则。【功能:移除实体组事件规则】 |
|
| Source: [E:\P4Share\engine\assets\engine\scar\rulesystem.scar] (303) | |
| Rule_RemoveEntityEvent( LuaFunction rule, EntityID entity ) | |
|
移除'entity'的活动事件规则。【功能:移除实体事件规则】 |
|
| Source: [E:\P4Share\engine\assets\engine\scar\rulesystem.scar] (296) | |
| Rule_RemoveGlobalEvent( LuaFunction rule ) | |
|
移除已全局应用的活动事件规则。【功能:移除全局事件规则】 |
|
| Source: [E:\P4Share\engine\assets\engine\scar\rulesystem.scar] (320) | |
| Rule_RemoveMe( ) | |
|
移除当前正在执行的规则(仅在规则函数内部有效)。【功能:移除当前规则】 |
|
| Source: [E:\P4Share\engine\assets\engine\scar\rulesystem.scar] (327) | |
| Rule_RemovePlayerEvent( LuaFunction rule, PlayerID player ) | |
|
移除'player'的活动事件规则。【功能:移除玩家事件规则】 |
|
| Source: [E:\P4Share\engine\assets\engine\scar\rulesystem.scar] (313) | |
| Rule_RemoveSGroupEvent( LuaFunction rule, SGroupID sgroup ) | |
|
移除'sgroup'中小队的活动事件规则。【功能:移除小队组事件规则】 |
|
| Source: [E:\P4Share\engine\assets\engine\scar\rulesystem.scar] (286) | |
| Rule_RemoveSquadEvent( LuaFunction rule, SquadID squad ) | |
|
移除'squad'的活动事件规则。【功能:移除小队事件规则】 |
|
| Source: [E:\P4Share\engine\assets\engine\scar\rulesystem.scar] (279) | |
| Rule_RemoveWithID( Integer id ) | |
|
移除具有指定id的当前活动规则(不会移除任何事件规则)。【功能:通过ID移除规则】 |
|
| Source: [E:\P4Share\engine\assets\engine\scar\rulesystem.scar] (346) | |
| Rule_Replace( LuaFunction oldf, LuaFunction newf ) | |
|
替换所有当前活动的具有Lua函数f的规则的函数回调(仅适用于时间规则)。【功能:替换规则回调函数】 |
|
| Source: [E:\P4Share\engine\assets\engine\scar\rulesystem.scar] (365) | |
| Rule_ReplaceWithID( Integer id, LuaFunction newf ) | |
|
替换所有当前活动的具有指定id的规则的函数回调(仅适用于时间规则)。【功能:通过ID替换规则回调函数】 |
|
| Source: [E:\P4Share\engine\assets\engine\scar\rulesystem.scar] (374) | |
| Rule_Unpause( LuaFunction f ) | |
|
取消暂停所有具有Lua函数的规则。【功能:取消暂停指定规则】 |
|
| Source: [E:\P4Share\engine\assets\engine\scar\rulesystem.scar] (458) | |
| Rule_UnpauseAll( ) | |
|
取消暂停所有规则。【功能:取消暂停所有规则】 |
|
| Source: [E:\P4Share\engine\assets\engine\scar\rulesystem.scar] (442) | |
| Rule_UnpauseWithID( Integer id ) | |
|
取消暂停所有具有指定id的规则。仅适用于时间规则。【功能:通过ID取消暂停规则】 |
|
| Source: [E:\P4Share\engine\assets\engine\scar\rulesystem.scar] (473) | |
| Rule_WhileInProximity( Function f, Boolean all, EGroupID who, Marker where, Integer OPT_range, Real OPT_interval, Boolean OPT_recur, Table OPT_data ) | |
|
当组在位置的范围内时,每隔interval秒触发一次。【功能:范围内持续触发规则】 |
|
| Source: [E:\P4Share\engine\assets\engine\scar\rulesystem.scar] (495) | |