Projectile not working

Started by the_nte, December 31, 2022, 08:23:23 PM

Previous topic - Next topic

the_nte

Hello everyone, I'm currently making a Shingo edit for my fullgame, it's my first piece of content for M.U.G.E.N (aside from some other very minor things) and I want him to have an Hadoken. Sadly, whenever I try to use it in-game, he uses a grab instead. Does anyone know how to fix this?
Here's the CNS:

; Gerry-doken
[Statedef 6001]
type = S
ctrl = 1
anim = 900
velset = 0,0
movetype = A
physics = S
sprpriority = 2

[State 0, Helper]
type = Helper
trigger1 = animelem = 7
name = "Gerry-doken"
ID = 6001
stateno = 6001
pos = 60,-60
postype = p1    ;p2,front,back,left,right
facing = 1
keyctrl = 0
ownpal = 0
supermovetime = 0
pausemovetime = 0


[State 195, 2]
type = ChangeState
trigger1 = AnimTime = 0
value = 0
ctrl = 1

; Gerry
[Statedef 6000]
type = S
anim = 6000
velset = 0,0
movetype = A
physics = S
sprpriority = 2

[State 0, VelSet]
type = VelSet
trigger1 = !time
x = 20

[State 200, Hitdef]
type = HitDef
trigger1 = !time
attr = S, NA
damage = 50,1
animtype = Light
guardflag = MA
hitflag = MAF
priority = 3, Hit
pausetime = 8, 8
guard.pausetime = 4,4
sparkno = s8000
guard.sparkno = s10000
sparkxy = -20,-30
hitsound = s5,5
guardsound = s5,10
ground.type = High
air.type = High
ground.slidetime = 5
ground.hittime  = 11
air.hittime = 11
ground.velocity = .9
air.velocity = -14,-10
airguard.velocity = -1.9,-.8
forcenofall = 1
numhits = 1 

[State 195, 2] ; hit player 2
type = ChangeState
trigger1 = movecontact
value = 6000
ctrl = 1

[State 195, 2] ; blows up after certain amount of time
type = ChangeState
trigger1 = time = 28
value = 6000
ctrl = 1

; Hadoken Hit P2
[Statedef 6000]
type = S
anim = 6000
velset = 0,0
movetype = A
physics = S
sprpriority = 2

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

; Hadoken Blow up
[Statedef 6000]
type = S
anim = 6000
velset = 0,0
movetype = A
physics = S
sprpriority = 2

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


Here's the CMD:
;Gerry-doken
[State -1, Hadoken]
type = ChangeState
value = 6001
triggerall = command = "Gerry-doken"
triggerall = statetype != A
trigger1 = ctrl

XGargoyle

You have many errors there:
-The state 6001 creates a helper that goes to state 6001, instead of 6000
-the projectile state (6000) will go to the same state 6000 after contacting the enemy or after 28 ticke, creating an endless loop
-you have 3 separate states numbered as 6000
-the last 2 states 6000 are basically the same state repeated


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!

the_nte

Thank you, I've tried another code but the projectile doesn't appear at all now.
Code:

;Gerry-doken
[Statedef 6001]
type     = S
movetype = A
physics  = S
juggle   = 1
anim     = 6001
velset   = 0,0
ctrl     = 0
poweradd = 10
sprpriority = 2

[State 6001, Œø‰Ê‰¹]
type = PlaySnd
trigger1 = AnimElem = 1
value = 0,1

[State 6000, Œø‰Ê‰¹}]
type = Projectile
trigger1 = AnimElem = 3
projanim = 6000
projhitanim = 6000
projpriority = 3
projshadow = -1
projscale = 0.7,0.7
offset = 0,-40
palfx.time = 28
palfx.time = 28
Palfx.add = 7,-200,-200
Palfx.sinadd = 30,30,0,10
Palfx.color = 0
Palfx.invertall = 1
velocity = 7
attr = S, SP
damage   = 80,30
animtype = heavy
guardflag = -1
hitflag = MAFDP
pausetime = 0,4
hitsound   = S14,0
sparkno = S111
sparkxy = 110,-30
guardsound = S3200,2
ground.type = Low
ground.slidetime = 25
ground.hittime  = 50
ground.velocity = -1
air.animtype = Back
air.velocity = -1,-6
air.juggle = 3
air.fall = 1
down.velocity = -1,-6
down.hittime = 30
down.bounce = 0
fall=1

[State 6000, hit]
type = HitDef
triggerall = palno != 12
trigger1 = time = 0
attr = S,SA
hitflag = MAF
guardflag = MA
animtype = hard
air.animtype = hard
damage = 85,10
pausetime = 12,12
sparkno = S111
sparkxy = -10,-60
hitsound = 5,3
guardsound = 6,0
ground.type = High
ground.slidetime = 15
ground.hittime  = 15
ground.velocity = -6
air.type = Low
air.hittime = 15
air.velocity = -6,-5
envshake.time = 7
envshake.freq = 80
envshake.ampl = -5
envshake.phase = 90
fall.envshake.time = 7
fall.envshake.freq = 80
fall.envshake.ampl = -5
fall.envshake.phase = 90

[State 6000, End]
type = ChangeState
trigger1 = AnimTime = 0
value = 0
ctrl = 1

Odb718

Do you have an animation 6000?
You should also have a 2nd animation for when the projectile hits. Right now you use Anim 6000 for the basic fireball and the animation for when it hits.
projanim = 6000
projhitanim = 6000

If you do have an anim 6001, does your anim 6001 have 3 frames?
In your first code you used anim 900 for the character's animation. Why did you switch it?
vVv Gouken718 vVv SabreTooth718 vVv


the_nte

I used 900 because I forgot to change values in that code I used from a tutorial on how to make an hadoken using a helper. And yes, animation 6001 has 3 frames.

Odb718

vVv Gouken718 vVv SabreTooth718 vVv


the_nte

Yes I do, I use it for the projectile itself and I use 6001 for Shingo throwing the projectile.