News:

MFG's Character of the Month: October 2026 Nominations

Main Menu

My MUGEN Development Questions Thread

Started by fer619, June 16, 2008, 07:57:28 PM

Previous topic - Next topic

fer619

Can anyone tell me how to make a projectile curve upwards then come down, like in the following diagram?



i really hope someone can help me with this.


Bastard Mami

negative y velocity, positive y acceleration.

fer619

#2
hmmm.....ok, i'll try that. thanks satou sei

Now another question. How come I can't execute any of my WIP's Specials or Super when i'm controlling him, and yet they are executing fine when he's CPU-controlled?


Bastard Mami

You must have something "wrong" in your cmd, that does noat allows the commands to be entered by humans. Post your cmd.

fer619

what part of the cmd do u want to see?


Bastard Mami

the command definitions and the changestates realted to the attacks you can't perform but the ai can.

fer619

#6
the commands as they appear in my char's cmd:

;-| Super Motions |--------------------------------------------------------

[Command]
name = "Super Baseball Throw"
command = ~D, DF, F, D, DF, F, x
time = 30

[Command]
name = "Super Baseball Throw"
command = ~D, DF, F, D, DF, F, y
time = 30

;-| Special Motions |------------------------------------------------------

[Command]
name = "Baseball Throw"
command = ~D, DF, F, x
time = 25

[Command]
name = "Jumping Baseball Throw"
command = ~D, DF, F, y
time = 25

[Command]
name = "Football Kick"
command = ~D, DF, F, a
time = 25


and here's what i have under StateDef -1:


;===========================================================================
;---------------------------------------------------------------------------
; Super Baseball Throw
[State -1, Super Baseball Throw]
type = ChangeState
value = 1100
triggerall = command = "Super Baseball Throw"
triggerall = power >= 1000
triggerall = statetype != A
trigger1 = ctrl
trigger2 = hitdefattr = SC, NA, SA
trigger2 = movecontact = 1

;---------------------------------------------------------------------------
; Baseball Throw
[State -1, Baseball Throw]
type = ChangeState
value = 1000
triggerall = command = "Baseball Throw"
trigger1 = statetype != A
trigger1 = ctrl

;---------------------------------------------------------------------------
; Jumping Baseball Throw
[State -1, Jumping Baseball Throw]
type = ChangeState
value = 1010
triggerall = command = "Jumping Baseball Throw"
trigger1 = statetype != A
trigger1 = ctrl

;---------------------------------------------------------------------------
; Football Kick
[State -1, Football Kick]
type = ChangeState
value = 1020
triggerall = command = "Football Kick"
trigger1 = statetype != A
trigger1 = ctrl


Bastard Mami

ok, they seem to be good, there is still a possible cause; move what goes after statedef-1 right after it, whitout anything before them, so it looks like:

[statedef -1]
;===========================================================================
;---------------------------------------------------------------------------
; Super Baseball Throw
[State -1, Super Baseball Throw]
type = ChangeState
value = 1100
triggerall = command = "Super Baseball Throw"
triggerall = power >= 1000
triggerall = statetype != A
trigger1 = ctrl
trigger2 = hitdefattr = SC, NA, SA
trigger2 = movecontact = 1

;---------------------------------------------------------------------------
; Baseball Throw
[State -1, Baseball Throw]
type = ChangeState
value = 1000
triggerall = command = "Baseball Throw"
trigger1 = statetype != A
trigger1 = ctrl

;---------------------------------------------------------------------------
; Jumping Baseball Throw
[State -1, Jumping Baseball Throw]
type = ChangeState
value = 1010
triggerall = command = "Jumping Baseball Throw"
trigger1 = statetype != A
trigger1 = ctrl

;---------------------------------------------------------------------------
; Football Kick
[State -1, Football Kick]
type = ChangeState
value = 1020
triggerall = command = "Football Kick"
trigger1 = statetype != A
trigger1 = ctrl

fer619

#8
ok, i'll try that when i get home and i'll let u know if it worked.

EDIT: Yessss! It worked!  :D thank u so much, satou sei! eres el mejor!!


fer619

uh, sorry for the bump, but i have just a few more questions. they're not as important as the above questions, but still i'd like to know:

1. when the opponent gets hit by my WIP's Super attack (a projectile), it still remains standing. What do i do so that the opponent falls to the ground after receiving my char's Super attack?

2. for the AI, what trigger do i need if i want my char to do a certain move when the opponent has launched a projectile?

3. when my char does his Super attack, it doesn't seem to consume any stockbars. why?

thanks in advance!


Bastard Mami

Quote from: fer619 on June 19, 2008, 07:39:49 PM
1. when the opponent gets hit by my WIP's Super attack (a projectile), it still remains standing. What do i do so that the opponent falls to the ground after receiving my char's Super attack?

He should not remain standing unless you put him into a custom states or have some weirf fall, vel and animtyope combinations.
If you are not using custom states make sure you use fall and airfall =  1 in your projectile's code.

Quote from: fer619 on June 19, 2008, 07:39:49 PM
2. for the AI, what trigger do i need if i want my char to do a certain move when the opponent has launched a projectile?

Something like, enemynear,numproj. to detect simple projectiles; detecting helper projectiles is more elaborate, something like enemynear,ishelper .

Quote from: fer619 on June 19, 2008, 07:39:49 PM
3. when my char does his Super attack, it doesn't seem to consume any stockbars. why?

you need to either have a negative power add in the statedef, use a power add sctrl in the super's code, or use the poweradd parameter in the super pause.

fer619

wow, thank you so much, amigo!  ;D You've helped me a lot! a jar of cookies for you


fer619

Yeah, it's me again, with a couple more questions.

1) i made a curving projectile (thanks to satou sei), now i want the projectile to bounce off the floor at least once. how do i get it to bounce?

2) can anyone tell me how to code a super jump (down, then up)?


Bastard Mami

1) there are two main ways, one is using helpers, and another one is using -2 code, just post which do you think should be better for you.

2) I suggest opening common1.cns and take a look at the jump state and analyze what it does, once you know how jumping works, it is very easy to edit it.

fer619




fer619

ok, then how is it done using statedef -2?


FerchogtX

For the bouncing proyectile, you can do it in two ways:

1.- StateDef -2: Set this if the proyectile lands

[State -2, Bounce from the ground]
type = VelSet
trigger1 = (vel Y > 0) && (Pos Y >= 0) ;Triggers if y velocity is more than 0 and your pos is more or equal to 0
x = whatever you want
y = whatever you want in negative

[State -2, Gravity]
type = VelAdd
trigger1 = (Vel Y < 0) && (Pos Y < 0) ; In air and going up
y = whatever you want for aceleration in positive

You can always use a variable to control properly this behavior, for example a VarAdd sctrl can help everytime the projectile lands, so in the certain moment you decide, it stops to bounce / move.

2.- Use a helper as a proyectile: As you know, helpers are like new players that help (wow! that's logical XD) your char, you can code one to behave as you want, basically can be the same as the code from statedef -2, but with the advantage of not needing any parent var. Is like coding a character statedef.

About SuperJump, there are 2 ways also, overriding states 40 / 50 or creating new states, both cases with the varset to point out that this move is activated... in the forst, a command can activate the variable, that modifies Y velocity, in the second, the comand activates a move that enables super jump var. Depends on your creativity.

See ya!!! :D
This is the era in which we will see reason triumphing against brutality... May be better to open your mind to the future.
------------------------------------------------------
<- [Clicky - Clicky]
Current Universal War Official Artwork

fer619

um, can u post an example of how the helper code should look like? i tried the state -2 code, but nothing happens.


fer619

OK, i decided to dig up my development questions thread to ask these questions:

1) for one of my char's winposes i gave him a win quote. the thing is that mugen switches to the next round before my char can finish saying his quote. what can i do about that?

2) there seems to be a problem with my char's jump kick. when it' not comboed, it works fine but when it is comboed, for example jump light punch->jump kick, he performs the light ounch fine but instead of the jump kick he uses the standing kick and ends up standing in the air. what could be the problem?

3) i gave my char an attack that is divided into three states- a start state, a jumping state and a landing state. the first two appear fine but the second anim does not change to the third state (landing state), it changes to state 0 instead. why?

thanks in advance  :)