YesNoOk
avatar

How to make a char guard crouching, standing and airial attacks at the same time (Read 1494 times)

Started by Redben, December 06, 2019, 03:08:04 pm
Share this topic:
How to make a char guard crouching, standing and airial attacks at the same time
#1  December 06, 2019, 03:08:04 pm
  • avatar
  • **
    • Morocco
Hello everyone.

Characters often have a STAND GUARD position which enables them to guard against standing and airial attacks, and another CROUCHING GUARD position to guard against crouching and standing ones, and some of them have AIRIAL position which enables them to guard while jumping.

What I want to do is to enable a character (Igniz2k1 by TightRiam specifically) to guard against all types of attacks (crouching, standing and airial) whith only one guarding position.

I've been trying to do this for some time now but to no avail. Does anybody know what specifically needs to be changed? Any insight is much welcomed. I've spent some time on this and I want to get it done lol. Thanks in advance.
Last Edit: December 09, 2019, 08:18:47 am by Redben
Re: How to make a char guard crouching, standing and airial attacks at the same time
#2  December 07, 2019, 07:29:42 am
  • ******
  • Legendary XIII
  • I am the eye of the storm to come!
    • New Zealand
    • network.mugenguild.com/cyanide/
Kinda difficult as the type 9f attack defines the statetype you need to be in to guard it. Possibly even the state itself as guarding is hardcoded all over the place. Best you can do i think is look into enemynear and hitdefattr. You can then either change state or statetype based on that.

Enemynear will not work on helpers. There is basically no way to pick that one up.


In M.U.G.E.N there is no magic button

They say a little knowledge is a dangerous thing, but it's not one half so bad as a lot of ignorance.
Re: How to make a char guard crouching, standing and airial attacks at the same time
#3  December 08, 2019, 12:40:04 am
  • avatar
  • **
    • Morocco
Kinda difficult as the type 9f attack defines the statetype you need to be in to guard it. Possibly even the state itself as guarding is hardcoded all over the place. Best you can do i think is look into enemynear and hitdefattr. You can then either change state or statetype based on that.

Enemynear will not work on helpers. There is basically no way to pick that one up.


Firstly, thanks a lot for the response.
I did follow your advice and kept modifying all of these matters in many different ways non stop (such as giving the hitdefattr (s) "SCA" and so on). And the only instance in which a change occured is when I modified the followings:

(In STATEDEF 120 in common.cns)

[State 120, Hi to Lo]
type = StateTypeSet
triggerall = !(var(59) || fvar(1) = 5)
triggerall = statetype = S
Trigger1 = command = "holddown"
statetype = C
physics = C

[State 120, Lo to Hi]
type = StateTypeSet
triggerall = !(var(59) || fvar(1) = 5)
triggerall = statetype = C
Trigger1 = command != "holddown"
statetype = S
physics = S

And slightly similar ones (with same Hi to Lo & Lo to Hi titles) in statedef 150,151,152,153 and also 140 in common.cns.

For example: I once replaced the <<!= "holddown">> in the second ones with <<= "holddown">>  (aka deleting the "!") and the result was both CROUCH GUARD and STAND GUARD guarding against standing and airial attacks only, without guarding against crouching ones.

I also tried switching the "!" (deleting it from the srcond ones and putting it in the first ones) and the result was STAND GUARD and CROUCH GUARD reversing their roles: meaning STAND GUARD guards against crouching and standing attacks while CROUCH GUARD guards against standing and airial ones.

I also replaced << != "holddown" >> with << != "holdup" >> in the second ones and the result was same as the first attempt above: CROUCH GUARD doing STAND GUARD job while the latter was obviously unaffected.

and so on and so on.

Now I wonder if this may give you any idea about what should be further done? Do you think these segments are key? Do you have any idea about what their role may specifically be? Again, thanks in advance.
Re: How to make a char guard crouching, standing and airial attacks at the same time
#4  December 09, 2019, 09:41:10 am
  • ******
  • Legendary XIII
  • I am the eye of the storm to come!
    • New Zealand
    • network.mugenguild.com/cyanide/
Those allow you to swap between crouch and stand. Crouch lets you guard crouching. If you redirect to the enemy you can have mugen do the swapping without the holddown component. Except it won't work on helpers and it probably won't work on projectiles.

Example

Trigger1 = enemynear(0), hitdefattr = C
Statetype = C

And reverse or repeat for A or S. However as i say this will not pick up helpers.


In M.U.G.E.N there is no magic button

They say a little knowledge is a dangerous thing, but it's not one half so bad as a lot of ignorance.