Helper won't go away with deleteself state controller

Started by MrSaturn100, March 15, 2026, 12:47:45 AM

Previous topic - Next topic

MrSaturn100

So I'm trying to add an intro to my pokemon fighter where they ride in on a furret then drop off when they reach the normal standing spot. There is a helper involved that is of the fighter themself riding the furret that will automatically drop off the moment they reach x = 0. The problem is that the helper version of said fighter won't go away and I've spent the past 6 hours trying to remove it using deleteself and other various state controllers. and of course I couldn't find any help about this issue online so this is pretty much my last resort as I don't know what else to do to fix it.

Here is the full code I'm working with so maybe someone who knows more than me can see what the issue is:
Spoiler (click to show)
;-----------------

;Furret intro
[Statedef 191]
type = S
ctrl = 0
anim = 9801
velset = 0,0

[State 190, 2] ;Assert this until you want "round 1, fight" to begin
type = AssertSpecial
trigger1 = time
flag = Intro
flag2=nomusic

[State 0, Helper]
type = Helper
trigger1 = facing = 1
triggerall = time = 0
helpertype = normal ;player
name = "Intro With Furret"
ID = 162
stateno = 162
pos = -100,-30
postype = p1    ;p2,front,back,left,right
facing = facing
ownpal = 1


[State 0, Helper]
type = Helper
trigger1 = facing = -1
triggerall = time = 0
helpertype = normal ;player
name = "Intro With Furret"
ID = 163
stateno = 162
pos = -100,-30
postype = p1    ;p2,front,back,left,right
facing = facing = -1
ownpal = 1


[State 0, PlaySnd]
type = PlaySnd
trigger1 = time = 0
value = S162,0
volumescale = 155
channel = -1


[State 0, ChangeState]
type = Changeanim
trigger1 = time = 215
value = 0

[State 0, ChangeState]
type = ChangeState
trigger1 = time = 525
value = 0


;-----------
[Statedef 162]
type = S
anim = 0
velset = 0.5,0

[State 0, Explod]
type = Explod
triggerall = numexplod(162) = 0
trigger1 = time = 0
anim = 162
ID = 162
pos = 10,30
postype = p1  ;p2,front,back,left,right
facing = 1
vfacing = 1
bindtime = -1
removetime = 525
sprpriority = 0
ownpal = 1
removeongethit = 1
scale = 0.5,0.5

[State 0, Explod]
type = Explod
triggerall = numexplod(162) = 0
trigger1 = time = 0
anim = 162
ID = 163
pos = 10,30
postype = p2  ;p2,front,back,left,right
facing = 1
vfacing = 1
bindtime = -1
removetime = 525
sprpriority = 0
ownpal = 1
removeongethit = 1
scale = 0.5,0.5

[State 0, ModifyExplod]
type = ModifyExplod
trigger1 = parentdist x = 0;[-1,5]
ID = 162
postype = p1  ;p2,front,back,left,right
facing = 1
bindtime = 1
pos = 10,30
removetime = -1
vel = 0.5,0

[State 0, ModifyExplod]
type = ModifyExplod
trigger1 = p2dist x = 0;[-1,5]
ID = 162
postype = p2  ;p2,front,back,left,right
facing = 1
bindtime = 1
pos = 10,30
removetime = -1
vel = 0.5,0

[State 0, ModifyExplod]
type = ModifyExplod
trigger1 = parentdist x = 0;[-1,5]
ID = 162
postype = p1  ;p2,front,back,left,right
facing = 1
bindtime = 1
pos = 10,30
removetime = -1
vel = 0.65,0

[State 0, ModifyExplod]
type = ModifyExplod
trigger1 = p2dist x = 0;[-1,5]
ID = 162
postype = p1  ;p2,front,back,left,right
facing = 1
bindtime = 1
pos = 10,30
removetime = -1
vel = 0.65,0

[State 0, StateTypeSet]
type = StateTypeSet
trigger1 = parentdist x = 0
statetype = A       ;S,A,C,L
movetype = I        ;I,A,H
physics = A         ;A,C,S,N

[State 0, StateTypeSet]
type = StateTypeSet
trigger1 = p2dist x = 0
statetype = A       ;S,A,C,L
movetype = I        ;I,A,H
physics = A         ;A,C,S,N

[State 0, DestroySelf]
type = DestroySelf
trigger1 = time = 215
(FYI: 215 is the time the fighter lands on the ground and 525 is the time the intro should stop and get into the fight)

Odb718

You're using explodes as the animation, not the helper itself from what I can see. RemoveExplod might be what you're looking for. Then set up the destroyself to check time is above a reasonable amount and if the explodes are gone.
vVv Gouken718 vVv SabreTooth718 vVv


MrSaturn100

Quote from: Odb718 on April 10, 2026, 03:19:39 AM
You're using explodes as the animation, not the helper itself from what I can see. RemoveExplod might be what you're looking for. Then set up the destroyself to check time is above a reasonable amount and if the explodes are gone.

It's not getting removed from RemoveExplod either... The explods are for the Furrets, not the character themself. Nothing I do that affects the character themself works! I've tried changing the state, changing the animation, deleting the helper, deleting the explod, NOTHING WORKED! It just doesn't want to go away and I'm at a genuine loss as to what to even try now...

MrSaturn100

I FIGURED OUT THE PROBLEM!

It was the StateTypeSet causing the issues, since it made the copied fighter act like the fighter rather than like a helper. So I removed that and just made the fighter and Furret separate helpers instead of together, then used VelSet and DestroySelf at the right time to make it look like they drop down from the Furret.
I'm sure it was a bit of a complicated fix, but what matters is that the intro actually works as intended now  :)