News:

MFG's Character of the Month: September 2026 Voting

Main Menu

Destroyself Problems

Started by G-knux19, September 28, 2020, 12:48:32 AM

Previous topic - Next topic

G-knux19

I having a problem with debugging errors for the harpoon helper.  It's giving me errors when it Destroys its shelf and sometimes it makes clones. 
I don't know what I'm doing wrong to make that error happen.

Here's a video

https://streamable.com/7h12ap

Thanks in Advance

Spoiler (click to show)

;Harpoon X
[Statedef 13001]
type = S
movetype = A
physics = N
juggle = 0
ctrl = 0
anim = 13001
poweradd = 0

[State 0, EnvColor]
type = EnvColor
trigger1 = movehit = 1
value = 255,255,255
time = 1

[State 0, VelSet]
type = VelSet
trigger1 = 1
x = 14.5

[State 200, PlaySnd]
type = PlaySnd
trigger1 =  time = 0
value = 2,1
channel = 4

[State 0, HitDef]
type = HitDef
trigger1 = time = 0
attr = SCA, SP        ;SCA,NA,SA,HA,NP,SP,HP,NT,ST,HT
hitflag = MAF        ;HLAFD+-
guardflag = MA         ;HLA
animtype = hard          ;light,medium,hard,back,up,diagup
air.animtype = hard
priority = 7,Hit   ;Hit,Miss,Dodge
damage = 67,37
pausetime = 1,9
hitsound   = s8000,8
guardsound = s8500,0
sparkno = S6511
guard.sparkno = s6510
sparkxy = -10,-8
ground.type = low      ;Low,Trip,None
air.type = low
air.hittime = 18
ground.slidetime = 18
guard.slidetime = 20
ground.hittime = 20
guard.hittime = 14
ground.velocity = -6,0
guard.velocity = -6
air.velocity = -4,-4
airguard.velocity = 0,0
ground.cornerpush.veloff = 0
air.cornerpush.veloff = 0
down.cornerpush.veloff = 0
guard.cornerpush.veloff = 0
airguard.cornerpush.veloff = 0
airguard.ctrltime = 0
getpower = 0, 0
givepower = 10, 10
hitonce = 1
fall = 0
AIR.FALL = 0
yaccel = .6
forcenofall = 1

[State 0, AssertSpecial]
type = AssertSpecial
trigger1 = 1
flag = noshadow

[State 0,Hitby];can only be hit by other projectiles
type = Hitby
trigger1 = 1
value = SCA,AP
ignorehitpause = 1

[State 1004, NotHitBy]
type = NotHitBy
trigger1 = 1
time = 1
value =  ,AA,AT

[State 1001, HitOverride]
type = HitOverride
trigger1 = 1
attr = SCA,AP
stateno = 13004
time = -1
ignorehitpause = 1

[state 0, attackmulset]
type = attackmulset
trigger1 = 1
value = parent, Fvar(0)
ignorehitpause = 1

[State 0]
type = Explod
trigger1 = MoveHit
trigger1 = NumExplod(13002) = 0
trigger1 = NumTarget > 0
ID = 13002
postype = p2
pos = -10,Pos Y + Const(size.mid.pos.y) - -60
anim = 13002
bindtime = -1
facing = -1
ignorehitpause = 1
removetime = 17
sprpriority = 3
ownpal = 1
scale = 1,1

[State 0]
type = Explod
trigger1 = MoveHit
trigger1 = NumExplod(13003) = 0
trigger1 = NumTarget > 0
ID = 13003
postype = p2
pos = -10,Pos Y + Const(size.mid.pos.y) - -60
anim = 13003
bindtime = -1
facing = -1
ignorehitpause = 1
sprpriority = -1
removetime = 17
ownpal = 1
scale = 1,1

[State 200, 4]
type = Destroyself
trigger1 = Movecontact
trigger2 = (frontedgedist <= -120 || backedgedist <= -120)

airforce111

usually that debug error means your helper is summoning another helper, mmmm can I see maybe the rest of the code? I feel like it may be the hit by or hit override im not sure

G-knux19

Quote from: airforce111 on September 28, 2020, 08:49:37 PM
usually that debug error means your helper is summoning another helper, mmmm can I see maybe the rest of the code? I feel like it may be the hit by or hit override im not sure

heres the first part of it.

Spoiler (click to show)
;---------------------------------------------------------------------------
;
[Statedef 13000]
type = S
movetype = A
physics = N
juggle = 0
ctrl = 0
anim = 13000
poweradd = 0
sprpriority = 3

[State 0, BindToParent]
type = BindToParent
trigger1 = 1
time = -1
pos = 2,4

[State 200, 2]
type = PlaySnd
trigger1 = Time = 34
value = s3, 6
volumescale = 100
channel = 0

[State 0, AngleDraw]
Type = AngleDraw
Trigger1 = Time >= 34
Scale = .5, .5+(Time / 34.0)

;-------------|Harpoon|--------------------------
[State 200,stand]
type = helper
trigger1 = time = 18
name = "Harpoon"
id = 13001
stateno = 13001
pos = 35,-62
postype = p1
ownpal = 1
sprpriority = 3 

[State 200, 4]
type = ChangeState
trigger1 = parent,movetype = H
value = 2555

[State 200, 4]
type = Destroyself
trigger1 = animtime = 0

Cyanide



In M.U.G.E.N there is no magic button

They say a little knowledge is a dangerous thing, but it's not one half so bad as a lot of ignorance.

Odb718

Try putting
[State 200, 4]
type = Destroyself
triggerall = !numhelper(13001)
trigger1 = animtime = 0  ;Change this

You'll want to change your animation, 13000, so that it has a blank frame at the end. Then you'll need to changer the trigger1 to be something like
trigger1 = time >= 70
Try to get a feeling for how long it's going to take and set that as the time.

@[user id=6464]Cyanide[/user]: He posted 13001, idk where 130001 is called? I'd like to see 1100 and 13004

It's hard to tell if the harpoon going off the screen is causing it, or what.

Also @G-knux19:

;-------------|Harpoon|--------------------------
[State 200,stand]
type = helper
triggerall = numhelper(13001) = 0 ;Always add this type of check so you don't spawn multiples
trigger1 = time = 18
vVv Gouken718 vVv SabreTooth718 vVv


Cyanide

Oh. First post.

I think the issue might actually be the nothitby/hitby mix. See if you get the same results with a global hitoverride?


In M.U.G.E.N there is no magic button

They say a little knowledge is a dangerous thing, but it's not one half so bad as a lot of ignorance.

G-knux19

Quote from: Odb718 on October 03, 2020, 11:26:38 PM
Try putting
[State 200, 4]
type = Destroyself
triggerall = !numhelper(13001)
trigger1 = animtime = 0  ;Change this

You'll want to change your animation, 13000, so that it has a blank frame at the end. Then you'll need to changer the trigger1 to be something like
trigger1 = time >= 70
Try to get a feeling for how long it's going to take and set that as the time.

@[user id=6464]Cyanide[/user]: He posted 13001, idk where 130001 is called? I'd like to see 1100 and 13004

It's hard to tell if the harpoon going off the screen is causing it, or what.

Quote


Also @G-knux19:

;-------------|Harpoon|--------------------------
[State 200,stand]
type = helper
triggerall = numhelper(13001) = 0 ;Always add this type of check so you don't spawn multiples
trigger1 = time = 18

Ok umm heres Stateno 1100 and 13004

Spoiler (click to show)
;---------------------------------------------------------------------------
; Harpoon Shot X
[Statedef 1100]
type    = S                      ;State-type: S-stand, C-crouch, A-air, L-liedown
movetype= A                      ;Move-type: A-attack, I-idle, H-gethit
physics = S                      ;Physics: S-stand, C-crouch, A-air
juggle  = 1                      ;Number of air juggle points move takes
velset = 0,0                     ;Set velocity (x,y) (Def: no change)
ctrl = 0                         ;Set ctrl (Def: no change)
anim = 1100                       ;Change animation (Def: no change)
poweradd = 10                    ;Power to add (Def: 0)
sprpriority = 2                  ;Set p1's sprite layering priority to 2 (in front)

[State 0, Width Char]
type = Width
trigger1 = 1
player = 30,0
edge = 80,0

[State 0]
type = Explod
trigger1 = time = 0
ID = 6120
anim = 6120
postype = p1
pos = 41, 2
bindtime = 1
sprpriority = 4
ownpal = 1
scale = 1,1
supermovetime = 9999

;--------------|High Priestess|--------------------------
[State 200,stand]
type = helper
trigger1 = time = 0
name = "Harpoon gun"
id = 13000
stateno = 13000
pos = 2,4
postype = p1
ownpal = 1

[State 240, 4]
type = ChangeState
trigger1 = AnimTime = 0
value = 0
ctrl = 1

;---------------------------------------------------------------------------
;Harpoon broke
[Statedef 13004]
type = S
movetype = A
physics = N
juggle = 0
ctrl = 0
anim = -1
poweradd = 0

[State 0, DestroySelf]
type = DestroySelf
trigger1 = 1

G-knux19

It works now  :)  Thanks a lot, guys, and the cloning problem is fixed too. 
Thank you both again for taking the time to help me out I really appreciate it.

Here's a vid of it working correctly.

https://streamable.com/bffrwn