YesNoOk
avatar

Movehit/movecontact not working. (Read 982 times)

Started by Ichisennen, August 14, 2011, 04:59:58 pm
Share this topic:
Movehit/movecontact not working.
#1  August 14, 2011, 04:59:58 pm
  • **
  • That guy who did that thing back then just because
AFAIK, there is nothing wrong with the way I wrote this:

Code:
[state BGpalFX]
type = BGPalFX
trigger1 = movehit
time = 60
add = 256,256,256
mul = 200,200,256
sinadd = 0,0,0,10
invertall = 0
color = 256

So that should work right? But when I added it to my very simple helper-projectile, it won't trigger for some reason. 


Code:
;-----------------------------------------------------------------------
;Blizzard Ball Crit
[Statedef 1276]
type = A
movetype = A
physics = N
sprpriority = 6
anim = 1287

[State 0, VelSet]
type = VelSet
trigger1 = time=0
x = 12
y = 0

[state BGpalFX]
type = BGPalFX
trigger1 = movehit
time = 60
add = 256,256,256
mul = 200,200,256
sinadd = 0,0,0,10
invertall = 0
color = 256


[State 0, HitDef]
type = HitDef
trigger1 = animelem = 1 || animelem = 2
attr = S,SP        ;SCA,NA,SA,HA,NP,SP,HP,NT,ST,HT
hitflag = MAF        ;HLAFD+-
givepower = 50, 0
getpower = 0,0
animtype = Hard         ;light,medium,hard,back,up,diagup
air.animtype = Hard
priority = 6,Hit   ;Hit,Miss,Dodg6
damage = var(40) := 40, var(41) := 10
pausetime = 10,60
sparkno = s1288
guard.sparkno = s1288
sparkxy = -30,0
hitsound = s5,31
guardsound = 0,0
ground.type = High      ;Low,Trip,None
ground.slide = 10
ground.hit = 10
air.hittime = 20
ground.velocity = -2,0
air.velocity = 0,0
sprpriority = 16
p1getp2facing = 0
fall = 0
fall.yvelocity = -4.5
fall.recover = 1
fall.recovertime = 4
fall.damage = 0
down.bounce = 0
kill = 1
guard.kill = 1
fall.kill = 1
numhits = 1
palfx.time = 80
palfx.add = 0,50,240
palfx.mul = 120,224,150
palfx.sinadd = 85,55,110,10
Palfx.color = 0
palfx.invertall = 1

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

[State DestroySelf]
type = DestroySelf
trigger1 = (MoveContact) || (Time > 60)
ignorehitpause = 1

The state that summons the blizzard ball:

Code:

;-------------------------------------------------------------------
;Blizzard
[statedef 1286]
type = S
physics = S
anim = 1290
poweradd = -350
sprpriority = 5
ctrl = 0

[State 0, Explod]
type = Explod
trigger1 = animelem = 8
anim = 1286
ID = 1286
pos = 70,-17
postype = p1  ;p2,front,back,left,right
facing = 1
vfacing = 1
bindtime = 1
vel = 0,0
accel = 0,0
random = 0,0
removetime = -2
supermove
pausemove
scale = 1,1
sprpriority = 0
ontop = 1
shadow = 0,0,0
ownpal = 0
removeongethit = 0

[State 0, Helper]
type = Helper
trigger1 = animelem = 8
helpertype = normal ;player
name = "BlizzardCrit"
ID = 1276
stateno = 1276
pos = 50,-20
postype = p1    ;p2,front,back,left,right
facing = 1
keyctrl = 0
ownpal = 0
size.xscale=0.9
size.yscale=0.9


[State 0, VelSet]
type = VelSet
trigger1 = animelem = 8
x = -13
y = 0

[State 0, PlaySnd]
type = PlaySnd
trigger1 = animelem = 2
value = S8,6
volume = 100

[State 1001, ChangeState]
type = ChangeState
trigger1 = animtime = 0
value = 0
ctrl = 1

So... y it no work?
Re: Movehit/movecontact not working.
#2  August 14, 2011, 05:05:49 pm
  • avatar
  • ******
    • Thailand
Because you're destroying it before it gets a chance to activate.
Re: Movehit/movecontact not working.
#3  August 14, 2011, 05:34:22 pm
  • **
  • That guy who did that thing back then just because