YesNoOk
avatar

My Air Projectile move leaves me grounded in midair and my Projectile Immune das (Read 20801 times)

Started by JasonThePhoenix, October 24, 2023, 10:58:17 pm
Share this topic:
My Air Projectile move leaves me grounded in midair and my Projectile Immune das
#1  October 24, 2023, 10:58:17 pm
  • **
    • UK
My Air Projectile move leaves me grounded in midair https://www.youtube.com/watch?v=GUA2__-hcrA

And my Projectile Immune dash is not projectile immune. This is my forward dash's code.

[Statedef 100]
type    = S
movetype= A
physics = S
ctrl = 0
anim = 100
sprpriority = 1

[State 100, 2]
type = velset
trigger1 = Time = 0
x = 80
y = 0

[State 100, PlayerPush]
type = PlayerPush
trigger1 = Time = [0,12]
value = 0

[State 100, 4]
type = ChangeState
trigger1 = Time = 12
value = 0
ctrl = 1

[State 100, 1]
type = nothitby
trigger1 = Time = [0,12]
value = SCA
time = 1

That last part makes my character's forward dash invincible to everything.

If I change this to "value = P" or "value = NP,SP,HP" Mugen crashes and I get an error message that says this:

Error parsing [State 100, 1]
Error in [Statedef 100]
Error in kfm.cns:3663
Character mugenversion is older than this version of M.U.G.E.N.
Error loading chars/ffs_0/ffs_0.def
Error loading p1

My mugen version is 1.1. My character has "mugenversion = 1.0" in his code.

Also your verification questions are still buggy and unreliable. Number of attempts before it let me post: 3
Last Edit: October 25, 2023, 12:24:43 am by JasonThePhoenix
Re: My Air Projectile move leaves me grounded in midair and my Projectile Immune das
#2  October 25, 2023, 03:02:53 am
  • ****
    • crepa.neocities.org

  • Online
Check if your air projectile move has type = A and physics either = A or = N (also needs gravity or veladd if it's N).

For the projectile invencibility, you need to specify if it's a stand, crouch or air move first, or just leave a comma if you want everything. The correct would be:

[State 100, 1]
type = nothitby
trigger1 = Time = [0,12]
value = , AP
time = 1
Last Edit: October 25, 2023, 09:01:42 pm by DeathScythe
Re: My Air Projectile move leaves me grounded in midair and my Projectile Immune das
#3  October 25, 2023, 02:48:27 pm
  • **
    • UK
Check if your air projectile move has type = A.

For the projectile invencibility, you need to specify if it's a stand, crouch or air move first, or just leave a comma if you want everything. The correct would be:

[State 100, 1]
type = nothitby
trigger1 = Time = [0,12]
value = , AP
time = 1

Thank you, the nothitby code is working as intended. Is it possible to make the forward dash projectile immune and grant the user bonus power if it is used to pass through a projectile?

Here is the broken Air Projectile code:

(It's supposed to be an aerial fireball aimed diagonally forwards and down like Akuma's)

[Statedef 925]
type    = A
movetype= A
physics = A
juggle  = 2
poweradd= 5
ctrl = 0
anim = 600
sprpriority = 2

[State 925, 1]
type = PlaySnd
trigger1 = Time = 1
value = 0, 0

[State 925, 2]
type = Projectile
trigger1 = AnimElem = 3
projanim = 191
Projhitanim = -1
Projremanim = -1
projcancelanim = -1
projremovetime = -1
projedgebound = 55
offset = 50,-250
projpriority = 1
projsprpriority = 4
velocity = 12,-12
ProjID = 1000
attr = S, SP
damage= 63
animtype = Heavy
hitflag = MAF
guardflag = MA
pausetime = 8, 8                 ;Time attacker pauses, time opponent shakes
sparkno = 0                      ;Spark anim no (Def: set above)
guard.sparkno = -1
sparkxy = -40, -304              ;X-offset for the "hit spark" rel. to p2,
hitsound = 5, 0                  ;Sound to play on hit
guardsound = 6, 0                ;Sound to play on guard
ground.type = High
ground.slidetime = 19
ground.hittime = 19
air.hittime = 19
guard.ctrltime = 19
ground.velocity = -12,0
guard.velocity = -10
air.velocity = -4, -5.5
airguard.velocity = -6.3,-1
air.juggle = 8
fall = 0
fall.recover = 0
air.fall = 1
air.recover = 0
getpower = 0,0
givepower = 0,0  ;03
nochainID = 0
yaccel = .5
Last Edit: October 25, 2023, 03:35:54 pm by JasonThePhoenix
Re: My Air Projectile move leaves me grounded in midair and my Projectile Immune das
#4  October 25, 2023, 09:05:25 pm
  • ****
    • crepa.neocities.org

  • Online
Weird. Since it's type = A and physics = A, it should make you fall down and land.
Are you sure the character is changing to this state?
Since you recorded a video of the issue, can you do the same with debug on? Would help identifying what is going on. The shortcut for it is ctrl + D.

Edit: oh, and about getting a bonus... maybe you can do something with ReversalDef, but is unreliable and it would make the enemy projectile change state or disappear. There is not a "right way" to do it other than workarounds, as far as I know.
Last Edit: October 25, 2023, 09:15:59 pm by DeathScythe
Re: My Air Projectile move leaves me grounded in midair and my Projectile Immune das
#5  October 26, 2023, 09:38:18 pm
  • **
    • UK
Weird. Since it's type = A and physics = A, it should make you fall down and land.
Are you sure the character is changing to this state?
Since you recorded a video of the issue, can you do the same with debug on? Would help identifying what is going on. The shortcut for it is ctrl + D.

Edit: oh, and about getting a bonus... maybe you can do something with ReversalDef, but is unreliable and it would make the enemy projectile change state or disappear. There is not a "right way" to do it other than workarounds, as far as I know.

Here's the footage. https://www.youtube.com/watch?v=hfhbEOY3nlc

Is there a way to have an invisible projectile spawn when dashing forwards, match the creator's position and hitbox, delete itself while giving its creator power if hit by a projectile, and delete itself without a power bonus when it's deleted at the end of the dash?

By the way there's some "ms-gamingoverlay-link" warning from Windows that pops up sometimes when opening a game, it's annoying. Is there a way to fix it? It's been there since I got this piece of junk PC, popping up every time I start a game.
Re: My Air Projectile move leaves me grounded in midair and my Projectile Immune das
#6  October 26, 2023, 10:13:04 pm
  • ****
    • crepa.neocities.org

  • Online
Looking at the video, the character is changing to state 920, but you posted state 925. Check that.
Also, it is going back to state 0 after the animation is done, it should not change state until the character lands on the ground:

[State 0, ChangeState]
type = ChangeState
trigger1 = Pos Y > -Vel Y
value = 52

Check KFM's normal air attacks to have an idea on how aerial moves are done.

Is there a way to have an invisible projectile spawn when dashing forwards, match the creator's position and hitbox, delete itself while giving its creator power if hit by a projectile, and delete itself without a power bonus when it's deleted at the end of the dash?

That would be a lot of work. Should be doable in a full game where the characters share the same code. As a stand alone character you'd have to break your head to come with something consistent...

What I can think of is to use Ink's projectile detector code and work from there.
Last Edit: October 26, 2023, 10:18:11 pm by DeathScythe
Re: My Air Projectile move leaves me grounded in midair and my Projectile Immune das
#7  October 27, 2023, 06:01:41 am
  • **
    • UK
Looking at the video, the character is changing to state 920, but you posted state 925. Check that.
Also, it is going back to state 0 after the animation is done, it should not change state until the character lands on the ground:

[State 0, ChangeState]
type = ChangeState
trigger1 = Pos Y > -Vel Y
value = 52

Check KFM's normal air attacks to have an idea on how aerial moves are done.

Is there a way to have an invisible projectile spawn when dashing forwards, match the creator's position and hitbox, delete itself while giving its creator power if hit by a projectile, and delete itself without a power bonus when it's deleted at the end of the dash?

That would be a lot of work. Should be doable in a full game where the characters share the same code. As a stand alone character you'd have to break your head to come with something consistent...

What I can think of is to use Ink's projectile detector code and work from there.

Thank you. You were right, an error in my Controller code put my character in 920 for both versions of the move. Air Fireball should have been 925.

There's this weird bug where mashing the AirDash button makes the sound effect at the start of the Air Dash play twice even though the Air Dash is coded to only happen once per jump max, what's causing it?

;Air Dash forward 16F
[Statedef 110]
type = A
physics = N
anim = 102
ctrl = 0

[State 110, 1]
type = ctrlset
trigger1 = time = 16
value = 1

[State 110, 2]
type = PlaySnd
trigger1 = time = 1
value = S0,0
volume = 90
channel = -1
freqmul = 1.0
loop = 0
pan = 0

[State 110, 3]
type = velset
trigger1 = Time = 0
x = 30
y = 0
trigger2 = Time >= 5
y = 0.75

[State 110, 4]
type = assertspecial
trigger1 = Time <= 17
flag = noairguard

[State 110, 5]
type = ChangeState
trigger1 = Time = 17
value = 51
ctrl = 1
Re: My Air Projectile move leaves me grounded in midair and my Projectile Immune das
#8  October 27, 2023, 02:53:43 pm
  • ******
There's this weird bug where mashing the AirDash button makes the sound effect at the start of the Air Dash play twice even though the Air Dash is coded to only happen once per jump max, what's causing it?

Either your character is somehow entering the stateDef twice very quickly, or the sound is playing in a different stateDef. Or maybe the same sound is assigned to another value.

Nothing in the above code would make it play twice.
Re: My Air Projectile move leaves me grounded in midair and my Projectile Immune das
#9  October 27, 2023, 07:45:31 pm
  • **
    • UK
There's this weird bug where mashing the AirDash button makes the sound effect at the start of the Air Dash play twice even though the Air Dash is coded to only happen once per jump max, what's causing it?

Either your character is somehow entering the stateDef twice very quickly, or the sound is playing in a different stateDef. Or maybe the same sound is assigned to another value.

Nothing in the above code would make it play twice.

Oh.

Is this causing the glitch?

 ;---------------------------------------------------------------------------
[State -1, Air Dash]
type = ChangeState
value = 110
trigger1 = ctrl
trigger1 = prevstateno !=110
trigger1 = statetype = A && Pos Y<-12
trigger1 = command = "FF"
;---------------------------------------------------------------------------
[State -1, Air Dash shortcut]
type = ChangeState
value = 110
trigger1 = ctrl
trigger1 = prevstateno !=110
trigger1 = statetype = A && Pos Y<-12
trigger1 = command = "c"
Re: My Air Projectile move leaves me grounded in midair and my Projectile Immune das
#10  October 28, 2023, 05:52:54 am
  • **
    • UK
Is there a way to prevent the glitch? Having the sound effect play twice even though only one airdash comes out is pretty annoying.
Re: My Air Projectile move leaves me grounded in midair and my Projectile Immune das
#11  October 28, 2023, 08:08:08 pm
  • ****
    • crepa.neocities.org

  • Online
I don't think this is the cause. Anyway, there is a much simpler code you can use:

[State -1, Air Dash]
type = ChangeState
value = 110
trigger1 = ctrl
trigger1 = prevstateno !=110
trigger1 = statetype = A && Pos Y<-12
trigger1 = command = "FF" || command = "c"

or

[State -1, Air Dash]
type = ChangeState
value = 110
triggerall = ctrl
triggerall = prevstateno !=110
triggerall = statetype = A && Pos Y<-12
trigger1 = command = "FF"
trigger2 = command = "c"



Have you tried searching for "playsnd" with ctrl+F?
Another thing you can do too is to enable debug, pause the game, open the console (ctrl + ~) and type "changestate 1 110", close the console, then go one frame forward (scroll lock) and look at the debug to see what is happening.
Re: My Air Projectile move leaves me grounded in midair and my Projectile Immune das
#12  October 29, 2023, 02:34:44 am
  • **
    • UK
I don't think this is the cause. Anyway, there is a much simpler code you can use:

[State -1, Air Dash]
type = ChangeState
value = 110
trigger1 = ctrl
trigger1 = prevstateno !=110
trigger1 = statetype = A && Pos Y<-12
trigger1 = command = "FF" || command = "c"

or

[State -1, Air Dash]
type = ChangeState
value = 110
triggerall = ctrl
triggerall = prevstateno !=110
triggerall = statetype = A && Pos Y<-12
trigger1 = command = "FF"
trigger2 = command = "c"



Have you tried searching for "playsnd" with ctrl+F?
Another thing you can do too is to enable debug, pause the game, open the console (ctrl + ~) and type "changestate 1 110", close the console, then go one frame forward (scroll lock) and look at the debug to see what is happening.

Using the debug console trick doesn't reveal anything that explains this.

The only playsnd code for the Air Dash state is:

[State 110, 2]
type = PlaySnd
trigger1 = time = 1
trigger1 = stateno = 110
value = S0,0
volume = 90
channel = -1
freqmul = 1.0
loop = 0
pan = 0

Tried changing the controller codes to one of the simpler codes you provided, neither stops the "plays sound effect twice" bug.

Sometimes mashing the button makes the sound effect play twice and sometimes it doesn't. Air Dashing into the foe or over the foe seems to usually make the sound effect play twice when mashing. I don't seem to be Air Dashing twice, just playing the sound effect twice.

Is there a way to give the "Playsnd" code a condition that a certain variable must be 0, and air dashing will set that variable to 1 until you land? Would that fix things?