Need help with helpers.

Started by L@sher, February 24, 2008, 06:11:12 PM

Previous topic - Next topic

L@sher

Well I have this helper that flies into the screen, but I want it to explode on contact if p2 hits it.  I can't seem to find a trigger that does this (only if p2 hits it). 

Here's what I got. Im a little confused

[Statedef 600, Call Helper]
type    = S
physics = N
movetype = A
anim = 430
ctrl = 0
velset = 0
poweradd = -1000

[State 600, Helper];
type = Helper
trigger1 = AnimElem = 1
helpertype = normal ;player
name = "Pigeon"
ID = (600)
stateno = 610
pos = 0,-50
postype = back    ;p2,front,back,left,right
ownpal = 1
keyctrl = 0

[State 600, Changestate]
type = ChangeState
trigger1 = AnimTime = 0
value = 0
ctrl = 1

;------------------------------------------------------------------------------
[Statedef 610, Pigeon]; Pigeon fly into screen
type = A
physics = N
movetype = A
anim = 600
velset = 2, 0
sprpriority = 3

[State 610, Explosion]
type = Explod
trigger1 = movecontact = 1  <----------------Need help here.  I want the explosion to occur only if p2 hits it.
anim = 610
pos = 35, -55
removetime = 35
ownpal = 1

[State 610, HitDef]
type = HitDef
trigger1 = time = 0
attr = S,NA        ;SCA,NA,SA,HA,NP,SP,HP,NT,ST,HT
hitflag = MAF        ;HLAFD+-
guardflag = MA         ;HLA
;affectteam = E          ;B,E,F
animtype = hard         ;light,medium,hard,back,up,diagup
air.animtype = hard
;fall.animtype = Back
priority = 4,Hit   ;Hit,Miss,Dodge
damage = 999999,999999
pausetime = 0,0
hitsound = 0,0
ground.type = High      ;Low,Trip,None
;air.type = High
ground.velocity = 0,0
air.velocity = 0,0
fall = 1
fall.yvelocity = -4.5
fall.recover = 1
fall.recovertime = 4
fall.damage = 0
air.fall = 01
down.velocity = -4,5
down.bounce = 1
kill = 1
guard.kill = 1
fall.kill = 1
numhits = 1
palfx.time = 0
;palfx.mul = 0,0,0
;palfx.add = 0,0,0

[State 610, DestroySelf]
type = DestroySelf
trigger1 = time > 350

Also, when p2 hits the helper, it turns into a copy of me.


My first sig =]                                                                               By Tempest

Bastard Mami

using a trigger in the helper's state5000 to detect who hit him can be done; but it wil be overcomplicating stuff, better use hitoverride.

L@sher

ok, but do you know why my helper turns into a copy of me when it gets hit instead of dissappearing? ???

My first sig =]                                                                               By Tempest

DNZRX768

Quote from: L@sher on February 24, 2008, 08:57:45 PM
ok, but do you know why my helper turns into a copy of me when it gets hit instead of dissappearing? ???

Check your sprites and animations...
Hug the Pikachus!

Hug A Pikachu Today!

L@sher

nah my animations are fine.  My helper literally turns into a copy of me whom the opponent can beat up. I just cant control him.

My first sig =]                                                                               By Tempest

Fallen_angel

Quote from: L@sher on February 24, 2008, 08:57:45 PM
ok, but do you know why my helper turns into a copy of me when it gets hit instead of dissappearing? ???

cause the helper doesn't have an state of get hit... so it copies the state of the player.... to avoid that use a nothitby

Bastard Mami

Quote from: R[E]ika on February 24, 2008, 08:54:16 PM
using a trigger in the helper's state5000 to detect who hit him can be done; but it wil be overcomplicating stuff, better use hitoverride.

L@sher

Well I figured everything out with all your help.

Thx to all who replied

My first sig =]                                                                               By Tempest