News:

MFG's Character of the Month: September 2026 Voting

Main Menu

I really couldn't think of any good idea of what to name this post

Started by jamestheepic, June 23, 2024, 08:44:19 AM

Previous topic - Next topic

jamestheepic

so i'm trying to make so my char returns to normal after doing a move however it doesn't changestate like its supposed to  and i need help on how to fix it.

heres the code:
;Dino Drop
[Statedef 410]
type    = S
movetype= A
physics = N
ctrl = 0
anim = 410
sprpriority = 3
velset = 0,0

[State 0, RemoveExplod]
type = RemoveExplod
trigger1 = numexplod(4204)
id = 4204

[State 0, PlaySnd]
type = PlaySnd
trigger1 = time = 0
value = S420,3
volumescale = 230
abspan = 0
channel = 2

[State 0, Helper]
type = Helper
trigger1 = time = 1
helpertype = normal ;player
name = "D I N O S A U R"
ID = 411
stateno = 411
pos = 0,-350
postype = p2
facing = -1
keyctrl = 0
ownpal = 0
supermovetime = 0
pausemovetime = 0
size.xscale = 1
size.yscale = 1


[State 0, DestroySelf]
type = DestroySelf
trigger1 = time >= 3


;---------------------------------------------------------------------------
;Dinosau
[Statedef 411]
type    = S
movetype= A
physics = N
ctrl = 0
anim = 411
sprpriority = 5
velset = 0,16

[State 0, VelAdd]
type = VelAdd
trigger1 = vel y > 0
y = 0.97

[State 0, EnvShake]
type = EnvShake
trigger1 = pos y >= -10
trigger1 = vel y > 0
time = 16
ampl = 4
freq = 170 

[State 0, PlaySnd]
type = PlaySnd
trigger1 = pos y >= -10
trigger1 = vel y > 0
value = S40,1
volumescale = 130
abspan = 0


[State 0, VelSet]
type = VelSet
trigger1 = pos y >= -10
y = 0

[State 0, PosSet]
type = PosSet
trigger1 = pos y > 0
y = 0

[State 0, PlaySnd]
type = PlaySnd
trigger1 = Time = 0
value = 420, 21

[State 0, HitDef]
type = HitDef
trigger1 = Time = 0
attr = A, HP
damage    = 55, 6
hitflag = MAFD
guardflag = HA
priority = 4
pausetime = 0,0
sparkxy = -10,0
hitsound   = s5,40
guardsound = S6,0
animtype = Hard
ground.type = High
ground.slidetime = 12
ground.hittime  = 15
ground.velocity = 0, 18
air.velocity = 0,18
fall = 1
fall.recover = 0

[State 0, Trans]
type = Trans
trigger1 = time >= 70
trans = addalpha
alpha = 256-((time-70)*25),0+((time-70)*25)

[State 0, PlaySnd]
type = PlaySnd
trigger1 = movehit
value = S420,4
volumescale = 130
persistent = 0

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

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

WastedCoder

You use DestroySelf for helpers only.
To make your character return to normal use ChangeState

[State 0, return]
type = Changestate
trigger1 =  animtime = 0 ; (or time >=3 if that's what you go for)
value = 0
ctrl = 1