Plataform development

Started by recruta42, September 30, 2007, 02:20:32 AM

Previous topic - Next topic

recruta42

Well...I am trying to improve the plataform of my game to be as close as possible to the original SSVSp but, I am getting a lot of problems with the HItState departament....

For start...

How do I set the "vel x" for a weak slash as -3.9375 if facing != enemyNear,facing and -7 for the other situations ?

PS: ground.velocity = ifelse(facing != enemyNear,facing,-3.9375,-7) DOESN´T WORK!

Messatsu

Two hitdefs.  Not the desired solution, but it might be the only.  Won't be a problem except for the case of two enemies... Can't remember if there was something that would only allow a hitdef for only one specific enemy.

Quote from: Bastard Wolf on May 12, 2008, 05:02:05 PM
Many people risk their lives everyday by having Mugen.

Bea

In order to make such statement work, you must assure that the hitdef is processed once per tick, as in, it's trigger is true once per tick.

So, I suggest using !MoveHit as your trigger for such hitdefs.

One has to do it because hitdef param expressions are parsed and evaluated at trigger time. If you use a trigger that happens before such situation is met, such as time = 0, it activates the hitdef, evaluates the expressions and saves the values in memory to use when a collision happens.
Princess Adora: "My friend saw She-Ra take her dress off in the shower. She said she has an 8 pack. She said She-Ra is shredded."

SF2NES is dead. Long live SF2NES.

Bastard Mami

you can also use a 0 velocity and use a targetvelset or something like that on hit

recruta42

#4
- Sadly but, !movehit solution didn´t work Bia (SMI ????) ...

- If is to use the targetvelset solution, since I am making a game, I belive it´s better to program it inside the HitStates on the common1.cns. The only problem are the long list of exceptions that I must program in order to achieve what I want. I will put here a list of grounded only hit moves that I have to code for you guys to have an idea about the real problem.

State    Type   Anim   Mugen   Animtype   Type   vel x   vel y   x accel   y accel   Slidetime   Hittime   P2 Dist x    P2 Statetype
Stand   C6   5000   0   1   -3,9375   0   0,5625   0   7                10                >=0                Stand
Stand   EC   5005   0   1 / 2   -7   0   1   0   7                10                < 0                Stand/Air
Stand   17E   5035   0   1   -5   0   1   0   5                 4                >=0                Air
Stand   CC   5010   0   2   -3,9375   0   0,5625   0   7                 10                >=0                Stand
Stand   C8   5001   1   1   -5,3125   0   0,5625   0   10                18                >=0                Stand
Stand   EE   5006   1   1 / 2   -10   0   1   0   10   26                < 0                Stand/Air
Stand   180   5036   1   1   -8   0   1   0   5   4                >=0                Air
Stand   CE   5011   1   2   -5,3125   0   0,5625   0   10   18                >=0                Stand
Stand   CA   5002   2   1   -9   0   0,5625   0   16   37                >=0                Stand
Stand   F0   5007   2   1 / 2   -12,375   0   1   0   13   47                < 0                Stand/Air
Stand   182   5037   2   1   -15   0   2   0   5   4                >=0                Air
Stand   D0   5012   2   2   -9   0   0,5625   0   16   37                >=0                Stand
Stand   2A8   5322   2   ?   -3   0   1   0   3   21                <>=0                Stand
Stand   2A6   5321   2   ?   -3   0   1   0   3   21                <>=0                Stand
Stand   C8   5001   3   1   -8   0   0,5625   0   15   18                 >=0                Stand

PS: Did you know that "back" animtype only works for hits that raises the enemy above the floor ? For ground attacks is interprets as hard animtype (GetHitVar(Animtype) = 2)...WTF!

PotS

Quote from: recruta42 on September 30, 2007, 02:19:01 PM
The only problem are the long list of exceptions that I must program in order to achieve what I want.
If it's so long then I guess it's better to code each of those exceptions inside the chars (as in not in common1.cns).
You can help with Ikemen GO's development by trying out the latest development build and reporting any bugs on GitHub.
My Mugen and Ikemen content can also be found here.

recruta42

#6
I believe that it is a better solution to code inside the common1 since it will serve for all chars in the future...

A weak hit on the ground will always behave the same way for all the chars with the vel X being -3,9375 if  "facing != enemyNear" with a fricction of 0,5625 and 7 if facing = enemyNear with a friccion of -1.

Well...technicaly speaking , how could I program inside state 5001 these parameters:
vel x = -3.9375
accel x = 0.5625
slidetime = 7
hittime = 10.

For a weak hit high ? Remember: All inside 5001...none of these parameters can be set inside hitdef sctrl..

Messatsu

QuoteWell...technicaly speaking , how could I program inside state 5001 these parameters:
Set variables to those values when a hit is successful.  The hit player recognizes who hit them and uses that player's variables to act appropriately.  Triggers for movehit / movecontact / moveguarded? will set those variables when true on the attacker side.

Quote from: Bastard Wolf on May 12, 2008, 05:02:05 PM
Many people risk their lives everyday by having Mugen.

Bastard Mami


recruta42

I would like now to know why ground.hittime = 18 + 8*(facing != enemyNear,facing) works and ground.velocity = ifelse(facing != enemyNear,facing,-3.9375,-7) doesn´t. Either way there are lots ot things to solve now on this puzzle

Bastard Mami

you know, the parser can be acting funny, snice i see redirection using comma inside an ifelse, though it should not REALLY matter, it can be a bug in the parser, specially because there is also comma checking for ground vel.

but i repeat myself, why would you use a negative friction ? while i admit it is an interesting concept and i will use it for some random stuff, most likely on sakura, i do not see why are you using it seriously.

recruta42

#11
Sorry , but where am I using negative friction ??????  ???

Well...maybe it is just a misundertanding but the only friction I am using is against the vel x and there are only two possible numbers for them: 0.5625 and 1

My challenge now is the veladd replacing the friction for sustaing the same number from the beggining to the end of the state. In this example:

type = Veladd
trigger1 = (GetHitVar(animtype) = [0,2]) && time > 0 && Time < GetHitVar(slidetime)
x = ifelse(facing != enemyNear,facing ,0.5625*(P2Statetype != A)+1*(P2Statetype = A),-1)

The problem is that if you hit an air attack the veladd must be 1 from the beggining to the end, BUT when the enemy lands on the floor the number changes from 1 to 0.5625 since he is not in the air anymore and I have to find a way to keep the same number all the time.


Bastard Mami

Quote from: recruta42 on September 30, 2007, 04:01:05 PM
I believe that it is a better solution to code inside the common1 since it will serve for all chars in the future...

A weak hit on the ground will always behave the same way for all the chars with the vel X being -3,9375 if  "facing != enemyNear" with a fricction of 0,5625 and 7 if facing = enemyNear with a friccion of -1.

Well...technicaly speaking , how could I program inside state 5001 these parameters:
vel x = -3.9375
accel x = 0.5625
slidetime = 7
hittime = 10.

For a weak hit high ? Remember: All inside 5001...none of these parameters can be set inside hitdef sctrl..

ok, i take it as a typo.

Messatsu

Quote from: [E]arly Morning Poison on October 01, 2007, 02:26:13 AM
you know, the parser can be acting funny, snice i see redirection using comma inside an ifelse, though it should not REALLY matter, it can be a bug in the parser, specially because there is also comma checking for ground vel.

but i repeat myself, why would you use a negative friction ? while i admit it is an interesting concept and i will use it for some random stuff, most likely on sakura, i do not see why are you using it seriously.
Putting the redirection in parenthesis should determine whether or not the parser is acting funny.

Quote from: Bastard Wolf on May 12, 2008, 05:02:05 PM
Many people risk their lives everyday by having Mugen.