Additional notes:
STATES LISTED AS -4 NEED TO BE IN EVERY STATE THAT THE CLONE CAN POSSIBLY ENTER.
Typically, custom combos have different delays. Your initialization should reflect this by modifying root, var(15):
[State Vism]
type = helper
triggerall = numhelper(500) = 0
trigger1 = command = "a"
trigger1 = var(15):= 12
trigger2 = command = "b"
trigger2 = var(15):= 36
trigger3 = command = "c"
trigger3 = var(15):= 60
stateno = 500
id = 500
postype = p1
pos = 0,0
;
Disable all afterimage controllers by using a numhelper(500) = 0 triggerall except for one like this in the player's initialization state:
[State Chaser]
type = afterimage
trigger1 = numhelper(500) = 1 && !ishelper
time = 99999999
length = var(15)
timegap = 1
framegap = floor(var(15) / 3)
palcontrast = 144, 0, 256
;
Palfx cannot apply to helpers so you can leave the clone the same color as the player but adjust the sprpriority in the statedef shortcut somewhat like this:
[Statedef 666]
...
sprpriority = ifelse(ishelper, -1, 2)
Or to apply a fake palfx that has the clone visually delayed by 1 tick:
[State -4]
type = assertspecial
trigger1 = ishelper
flag = invisible
[State -4]
type = afterimage
trigger1 = ishelper
time = 999999
length = 2
timegap = 1
framegap = 1
palcontrast = 96, 96, 256
;
The clone cannot be hit by anything:
[State -4]
type = nothitby
trigger1 = ishelper
time = 2
value = AA, AP, AT
;
This allows for the clone to combo:
[State -4]
type = changestate
trigger1 = ishelper
trigger1 = helper(666), stateno != helper(504), var(( helper(500), var(2) ))
trigger1 = helper(504), var(( helper(500), var(2) )) != [0,110)
value = helper(504), var(( helper(500), var(2) ))
There will result in a slight error from the helper missing an attack where the player made contact resulting in a completely different position for the clone. To fix this and use a changestate, you need to apply constant position adjustment:
[State -4]
type = posset
trigger1 = ishelper
postype = p1
x = helper(500), pos x - helper(501), var((var(1))) + 160
y = helper(500), pos y - helper(502), var((var(1)))
Alternatively, you can use a destroyself using similar restrictions to the changestate and allow the respawning in the correct position to be handled by the helper, 500. I have found this fairly unreliable so far, but would be more efficient.
;
Aerial states need to have their velocity adjusted. Otherwise they start with nothing and sink to the ground.
[State -4]
type = velset
trigger1 = ishelper && !time
trigger1 = helper(500), var(2) = [0,30)
X = helper(501), fvar( helper(500), var(2) )
Y = helper(503), fvar( helper(500), var(2) )
[State -4]
type = velset
trigger1 = ishelper && time = 0
trigger1 = helper(500), var(2) = (29,60)
X = helper(502), fvar( helper(500), var(2) - 30 )
Y = helper(504), fvar( helper(500), var(2) - 30 )
;
When two states are followed by each other, the second state won't be entered by the clone. To avoid this, make the states wheel, if in state 200, then go to the exact same state 201 (only difference in 200 and 201 is stateno) given conditions to go into a state.
;
States 0 and 11 need destroyselfs set.