Mugen DEV Forum


  Reply to this topicStart new topicStart Poll

> Cleaner CMD chain combos
Posted: Oct 20 2002, 03:25 AM
Report PostQuote Post





Group:
Posts:
Member No.:
Joined: --



This is only a theory as I have just started programming my first character and wont be implementing it just yet.

Instead of doing
trigger1 = stateno = 200
trigger2 = stateno = 201
trigger3 = stateno = 202
trigger4 = stateno = 203

why not classify those moves with var(0)=0-8
I am suggesting setting in pseudo code
WP=1
WK=2
MP=3
MK=4
FP=5
FK=6
Specials=7
Supers=8

I am not being real clear but for example: for a MK you would replace the above with trigger1= var(0) < 4 allowing you to chain from WP, WK, or MP. And when in a standard walking, standing, etc. state you would reset var(0) = 0.

*edit* Here is what I actually got now that it is implemented.
in the cmd
[State -1]
type = ChangeState
value = 200
triggerall = command = "x"
triggerall = command != "holddown"
triggerall = statetype != A
trigger1 = ctrl
trigger2 = var(0) < 1
trigger2 = movecontact = 1

in the cns
[State -3]
type = VarSet
trigger1 = ctrl
var(0) = 0
Mini ProfilePMEmail Poster
Top
Maximilian Jenus
Posted: Oct 20 2002, 06:52 PM
Report PostQuote Post


[E]
***

Group: Members
Posts: 243
Member No.: 215
Joined: 15-September 02



it's prefectly workable, and also is a good and ellegant solution; would be good if some creators implement that


--------------------
It is your selection of relevant facts that will create interest.A sweeping conception carries with vitality ,purpose and conviction. The more detailed and involved we get,the less forceful and powerful is our message.We can take a compass and draw a circle perfectly ,but we have left no trace of ou
Mini ProfilePMUsers WebsiteMSN
Top
Tenshin
Posted: Oct 21 2002, 11:46 PM
Report PostQuote Post


Member
**

Group: Members
Posts: 14
Member No.: 567
Joined: 20-September 02



here's 2 more ways to do it

1) trigger1 = stateno = [200, 203]

this is inclusive so it's really 200-203 and not just the inbetweens

2) trigger1 = hitdefattr = S, NA
now this will trigger only on all standing, normal attacks, but this will trigger after the frame with the hitdef but i assume this should be the right way since having a

trigger1 = stateno =[200, 203]
will allow u to change state anytime during the state, before or after a hit.

so if u want to cancel out of any special moves u can do like
trigger1 = hitdefattr = SC, SA
this will allow u to cancel out of any standing/crouching special attack

hope this helps

Mini ProfilePMUsers Website
Top
Maximilian Jenus
Posted: Oct 25 2002, 03:37 PM
Report PostQuote Post


[E]
***

Group: Members
Posts: 243
Member No.: 215
Joined: 15-September 02



In reply to the edit:
Actually, movecontact is barely needed in most fighting games; cancelling one move into other depends mostly on animelems;in most games attacks can only be cancelled on the "hitting" frame.I will put an example on how do i code movecancelling.

[statedef -1]

[State -1]
type = varset
v = 20
trigger1 = 1
value = 0
;this resets the cancelling var

[State -1]
type = varset
trigger1 = statetype = C && ctrl
trigger2 = stateno = 10 && ctrl
v = 20
value = Var(20) | 1

[State -1]
type = varset
trigger1 = statetype = S && ctrl
v = 20
value = Var(20) | 2

[State -1]
type = varset
trigger1 = statetype = A && ctrl
v = 20
value = Var(20) | 4
;those are used to simplify cancel code for stuff that requires control

[State -1]
type = varset
trigger1 = Stateno = 430 && animelemtime(3) > 0 && animelemtime(6)< 0
trigger2 = Stateno = 230 && animelemtime(2) > 0 && animelemtime(5)< 0
trigger3 = Stateno = 250 && animelemtime(4) > 0 && animelemtime(6)< 0
trigger4 = Stateno = 440 && animelemtime(2) > 0
trigger5 = Stateno = 420 && animelemtime(2) > 0
trigger6 = Stateno = 240 && animelemtime(2) > 0 ;&& animelemtime(3)< 0
trigger7 = Stateno = 220 && animelemtime(3) > 0 ;&& animelemtime(3)< 0
v = 20
value = Var(20) | 8
;now, this is a list of all the attacks that can be cancelled to special attacks.
;I am working with bitwise operators, so i can use a single var like it was 32 different vars
;You only have to keep on using powers of 2.

[State -1]
type = ChangeState
value = 6000
triggerall = command = "QCBQCF_a"
trigger1 = Var(20) & 1
trigger2 = var(20) & 2
trigger3 = Var(20) & 8
;there is an example on how to do the checking using the & bitwise operator, it can be rather simplified to:
;trigger1 = Var(20) & 11
;which is the sum of the bits used to check, for faster execution.


--------------------
It is your selection of relevant facts that will create interest.A sweeping conception carries with vitality ,purpose and conviction. The more detailed and involved we get,the less forceful and powerful is our message.We can take a compass and draw a circle perfectly ,but we have left no trace of ou
Mini ProfilePMUsers WebsiteMSN
Top
Posted: Oct 25 2002, 07:56 PM
Report PostQuote Post





Group:
Posts:
Member No.:
Joined: --



oo dont know too much about bitwise operators yet i imagine they would be quicker like you say, i'll look into it for myself. As for the movecontact comment i think you would need to put it in or else you can whiff the move (cancel it from far away) unless that is what you want. I have found that regulars need contact to cancel while super/special can cancel anywhere.
Mini ProfilePMEmail Poster
Top
Maximilian Jenus
Posted: Oct 26 2002, 10:46 PM
Report PostQuote Post


[E]
***

Group: Members
Posts: 243
Member No.: 215
Joined: 15-September 02



It's better to work with what you fell more comfortable with.

btw, you are right about the cancelling, if you are talking vs series games,whiff cancelling is total in kof, though.


--------------------
It is your selection of relevant facts that will create interest.A sweeping conception carries with vitality ,purpose and conviction. The more detailed and involved we get,the less forceful and powerful is our message.We can take a compass and draw a circle perfectly ,but we have left no trace of ou
Mini ProfilePMUsers WebsiteMSN
Top
Robnius
Posted: Nov 6 2002, 01:18 PM
Report PostQuote Post


Member
**

Group: Members
Posts: 79
Member No.: 384
Joined: 16-September 02



Is using this code stealing? :- I would like to try it. smile.gif
Can I put the name of Messatsu13 right on the side of the code.
That will give him credit, right?


--------------------
Just fight me if you can beat me, I hate wasting time!!
Mini ProfilePMEmail PosterUsers WebsiteMSN
Top
Robnius
Posted: Nov 6 2002, 04:52 PM
Report PostQuote Post


Member
**

Group: Members
Posts: 79
Member No.: 384
Joined: 16-September 02



It is not working for me, can you tell me what am I doing wrong, please?
I can't chain the loz punch with the medium punch ???

This is in the CMD
;Medium Punch
[State -1, Medium Punch]
type = ChangeState
value = 210
triggerall = Command = "y"
triggerall = Command != "holddown"
trigger1 = StateType = S
trigger1 = Ctrl
trigger2 = var(0) < 4
trigger2 = movecontact = 1
trigger2 = StateNo = 210 && Time = 18 ; So it doesn't be infinite

This is the State of Low Punch:
; Light Punch
[Statedef 200]
type = S ; State-type: S-stand, C-crouch, A-air, L-liedown
movetype= A ; Move-type: A-attack, I-idle, H-gethit
physics = S ; Physics: S-stand, C-crouch, A-air
juggle = 1 ; Number of air juggle points move takes
ctrl = 0 ; Set ctrl (Def: no change)
anim = 200 ; Change animation (Def: no change)
poweradd = 50

[State 200, VarSet0]
type = VarSet
trigger1 = Time = 0
v = 0
value = 1

[State 200, PlaySnd0]
type = PlaySnd
trigger1 = Time = 0
blah,blah,blah,blah,blah....

This is in the CNS below "[Statedef -3]"
; Code by Messatsu13
[State -3]
type = VarSet
trigger1 = ctrl
var(0) = 0

[State -3]
type = VarSet
trigger1 = StateNo = 200
var(0) = 1


--------------------
Just fight me if you can beat me, I hate wasting time!!
Mini ProfilePMEmail PosterUsers WebsiteMSN
Top
Posted: Nov 7 2002, 03:38 PM
Report PostQuote Post





Group:
Posts:
Member No.:
Joined: --



You dont have to give credit next to the code you borrowed from me just throw it in the read me I dont really care that much anyways. It is nothing monumental.

As for the reason you cant get it to chain you have trigger2 = stateno = 210 where that is the state you are defining I think if you change it to 200 everything will be honkey dorry. You are also not using the same numbering system, but as long as you know what you are doing im okay with that. Get rid of the second state-3 in your post it is redundant.
Mini ProfilePMEmail Poster
Top

Topic Options Reply to this topicStart new topicStart Poll

 


- M.U.G.E.N Development Forum - Contact an admin - ELECBYTE - Shin Mugen -