1. holding the target:
2. jumps offscreen
3. slides in with the ring
4. jumps with the target
5. ring slides out
[State 3152, ChangeState] ; change the state when she goes offscreen
type = ChangeState
trigger1 = BackEdgeBodyDist <= -10
value = 3153
ctrl = 0
;----------
[Statedef 3153]
type=A
physics=N
movetype=A
ctrl=0
velset=0,0
sprpriority=1
[state 3153,Posset]
type=posset
trigger1=!time
y=-34
x=-200*facing
[State 3153, ChangeAnim]
type = ChangeAnim
trigger1 = !time
value = 3153
[State 3153, TargetState]
type = TargetState
triggerall = NumTarget
trigger1 = !time
value = 3160
; I will skip the "target bind" states, pretend they are here
[State 3153, Helper] ; here is the Ring
type = Helper
trigger1 = !time
helpertype = normal
name = "Ring"
ID = 3170
stateno = 3170
postype = p1
ownpal = 1
[State 3153, ScreenBound]
type = ScreenBound
trigger1 = time < 130
value = 0
movecamera = 0,0
[State 3153, VelSet] ; here is where she slides in (already on top of the ring and holding the target, this is why the helper is bounded with the player)
type = VelSet
trigger1 = time = 10
x = 5
[State 3153, VelSet] ; here is where she stops
type = VelSet
trigger1 = time = 30
x = 0
[State 3153, VelSet] ; here is where she jumps with the target
type = VelSet
trigger1 = animelem = 5
x = 4.2
y = -10
[State 3153, VelAdd] ; gravity
type = VelAdd
trigger1 = animelemtime(5)>0
y = .6
[State 3153, ChangeState] ; change state when she hits the ground with the target
type = ChangeState
trigger1 = pos Y >= 0 && vel Y > 0
value = 3154
ctrl = 0
; now for the helper
;Ring
[StateDef 3170]
type = A
physics = N
moveType = I
anim = 3170
[State 3170, BindToRoot] ; I used this so the Ring can slide with the player
type = BindToRoot
trigger1 = time <= 30
pos = -90,34
[State 3170, ScreenBound]
type = ScreenBound
trigger1 = 1
value = 0
movecamera = 0,0
[State 3170, VelSet] ; and after she jumps, the ring slides offscreen
type = VelSet
trigger1 = time = 110
x = -6
[State 3170, DestroySelf]
type = DestroySelf
trigger1 = time >= 130