【详细教程】检测永续,99%有用
前言
今天教大家如何实际应用3A上次发的永续检测
首先要了解一种重定向:
PlayerID(xx)
这个跟enemynear或helper(xx)等等一样用法,但是它不分敌我,且能检测到helper。
接着要了解一个概念:
PlayerID与HelperID
HelperID很容易理解,就是亲生成的该HELPER的ID,就是用于脱离用的那个ishelper(xxx)的ID。但PlayerID,则是该场对局也就是matchover以前的,上场的Player的ID,这个ID【也包括HELPER】。
比如说——1P与2P是56和57的ID,然后,不论是谁生成的第一个HELPER,那么它的PlayerID必定是58,接着往后不断+1,以此类推。
以上都是废话,你看不懂就直接抄下面的
[Statedef XXX]
Type = X
MoveType = X
Physics = N
ctrl = 0
;var(0) 正在探查的playerid
;var(1)探查间隔
;var(2)探查到的playerid
;var(3)敌方永续的playerid
[state 探查初始化]
type = Varset
triggerall = ishelper
trigger1 = !var(0)
var(0) = 57+numenemy;只检测敌方helper,如果检测要敌方本体的永续直接用enemy重定向
ignorehitpause = 1
[state 敌方永续helper探查]
type = Varset
triggerall = ishelper
trigger1 = !var(3)
trigger1 = playerid(var(2)),movecontact+playerid(var(2)),movehit=0&&playerid(var(2)),numtarget;敌方永续时
var(3) = var(2)
ignorehitpause = 1
[State 探查开始]
type = null
triggerall = ishelper&& Enemy,NumHelper
triggerall = roundstate = 2
triggerall = var(0) >= 0
triggerall = ((var(1) := var(1) - (var(1) > 0)) * 0) || 1
triggerall = var(1) = 0
trigger1 = (var(0) := var(0) + 1) * 0
;以下复制越多,探查速度越快
trigger1 = (var(0) := var(0) + 1) * 0 || playerIDexist(var(0))=0
trigger1 = (var(0) := var(0) + 1) * 0 || playerIDexist(var(0))=0
trigger1 = (var(0) := var(0) + 1) * 0 || playerIDexist(var(0))=0
trigger1 = (var(0) := var(0) + 1) * 0 || playerIDexist(var(0))=0
trigger1 = (var(0) := var(0) + 1) * 0 || playerIDexist(var(0))=0
trigger1 = (var(0) := var(0) + 1) * 0 || playerIDexist(var(0))=0
trigger1 = (var(0) := var(0) + 1) * 0 || playerIDexist(var(0))=0
trigger1 = (var(0) := var(0) + 1) * 0 || playerIDexist(var(0))=0
trigger1 = (var(0) := var(0) + 1) * 0 || playerIDexist(var(0))=0
;以上复制
trigger2 = playerid(var(0)),teamside!=teamside;确认为敌方helper时
trigger2 = playerIDexist(var(0))
trigger2 = var(1) := 15;探查间隔
trigger2 = var(2) := var(0)
ignorehitpause = 1
同理你也可以做飞行道具检测啥的.....
终于看懂了,太妙了!
原来还能这么写,果然是大神