projectile wont fire

Started by jamestheepic, June 11, 2024, 09:38:35 AM

Previous topic - Next topic

jamestheepic

so basically i'm trying make my character shoot a projectile but when i try click the move he does the animation but no fireball spawns

heres the code

[Statedef 1000]
type    = S
movetype= A
physics = S
poweradd= 55
velset = 0,0
anim = 1000
ctrl = 0
sprpriority = 2

[State 1000, 1]
type = PlaySnd
trigger1 = Time = 8
value = 0, 2
channel = 1

[State 1000, 3 Helper]
type = Helper
trigger1 = animelem = 10
name = "Fireball"
ID = 1000
stateno = 1001
pos = 43,-60
postype = p1   
facing = 1
ownpal = 1
supermovetime = 0
pausemovetime = 0

[State 1000, 7]
type = ChangeState
trigger1 = AnimTime = 0
value = ifelse(Pos Y != 0 || Vel Y != 0,50,0)
ctrl = 1

[Statedef 1001]
type    = S
movetype= A
physics = S
poweradd= 55
velset = 4,0
anim = 1001
sprpriority = 2

[State 1001, 1 HitDef]
type = HitDef
trigger1 = time = 10
attr = S, SP
animtype  = Medium
damage    = 50, 4
hitflag = MA
guardflag = L
pausetime = 0,12
sparkno = S70010
guard.sparkno = S7000
sparkxy = -10,0
hitsound   = S5,0
guardsound = S6,0
ground.type = Low
ground.slidetime = 12
ground.hittime  = 17
ground.velocity = -4
air.velocity = -2,-4.2
ground.cornerpush.veloff = 0
air.cornerpush.veloff = 0
down.cornerpush.veloff = 0
guard.cornerpush.veloff = 0
airguard.cornerpush.veloff = 0
palfx.time = 10
palfx.mul = 250,224,120
palfx.add = 240,50,0
palfx.sinadd = 110,55,85,10

[State 1002, DestroySelf]
type = DestroySelf
trigger1 = !animtime

let me know if theres any problems in the code if not any suggestions welcome.

XGargoyle

Do you have an animation 1001?


XGargoyle: Battle posing since 1979
http://xgargoyle.mgbr.net
http://www.pandorabots.com/pandora/talk?botid=e71c0d43fe35093a  <-- Please click that link
http://paypal.me/XGargoyle  <-- Donations welcome!


Million Miles

It looks like either [anim 1000] never reaches animelem=10 or [anim 1001] has very short/weird loop time. Also double check that [anim 1001] doesn't have any duplicates.

jamestheepic

no it doesnt have any duplicates

Million Miles

It would be nice to see how .air file code for both 1000 and 1001 looks like.

jamestheepic

here it is
; Fireball shoot
[Begin Action 1000]
Clsn2: 1
  Clsn2[0] = -41, -97, 49, 1
0,0, 0,0, 10


; Fireball
[Begin Action 1001]
Clsn1Default: 1
  Clsn1[0] = -7, -7, 8, 9
1000,0, 0,0, 10
1000,1, 0,0, 10

Million Miles

Animation 1000 has only 1 element so animelem=10 never triggers. Use time=x instead to create a fireball helper. Like this:

[State 1000, 3 Helper]
type = Helper
trigger1 = time = 8
name = "Fireball"
ID = 1000
stateno = 1001
pos = 43,-60
postype = p1   
facing = 1
ownpal = 1
supermovetime = 0
pausemovetime = 0