Jump to content
  • 0

coding help


seijura

Question

I dont know where to post this. please move it if I'm in the wrongs section. my problem is my z button attack is spammable and I dont know how to adjust it to atleast make it use until the animation is done. here is my code:

 

command

Command Z

[State -1, Command Z]

type = ChangeState

value = 210

trigger1 = command = "z"

trigger1 = statetype !=A

trigger1 = ctrl

 

states

;Command Z

[Statedef 210]

type = S

movetype= A

physics = S

juggle = 4

poweradd= 30

ctrl = 0

velset = 0,0

anim = 210

sprpriority = 1

 

[State 0, Projectile]

type = Projectile

trigger1 = animelem = 1

ProjID = 201

projanim = 520

projhitanim = 1

projscale = 1,1

projremove = 1

projhits = 1

projpriority = 4

projsprpriority = 3

velocity = 5,0

offset = 42,-30

postype = p1 ;p2,front,back,left,right

 

; HitDef

attr = S,NP ;SCA,NA,SA,HA,NP,SP,HP,NT,ST,HT

hitflag = MAF ;HLAFD+-

guardflag = MA ;HLA

animtype = light ;light,medium,hard,back,up,diagup

air.animtype = light

priority = 4,Hit

damage = 5,1

pausetime = 0,4

sparkno = s520

;guard.sparkno = 0

sparkxy = 0,0

hitsound = 0,0

guardsound = 0,0

ground.type = Low

air.type = Low

ground.slidetime = 15

ground.hittime = 20

ground.velocity = -4,-3

air.velocity = -4,-3

ground.cornerpush.veloff = 0

guard.velocity = 0

air.cornerpush.veloff = 0

down.cornerpush.veloff = 0

guard.cornerpush.veloff = 0

airguard.cornerpush.veloff = 0

fall = 1

hitonce = 1

envshake.time = 8

envshake.freq = 120

envshake.ampl = 2

 

[State 210, 5]

type = ChangeState

trigger1 = command = "x" && time > 11

value = 201

ctrl = 0

 

 

[State 210, 5]

type = ChangeState

trigger1 = AnimTime = 0

value = 0

ctrl = 1

 

thanks for the help in advance.

Link to comment
Share on other sites

1 answer to this question

Recommended Posts

  • 0

do you mean wait until the projectile is gone? because it looks like you can't do the attack again from itself, as there's no ctrl and you need ctrl to be able to do the attack.

 

Try adding

 

triggerall = numprojID(201) = 0

 

that will make it so there can only be one of this projectile on the screen at a time. make sure to put the triggerall on top of all the other trippers.

 

No the character can only have on of these projectile out at a time. Hope that helps.

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...