News:

MFG's Character of the Month: October 2026 Nominations

Main Menu

Problem with a winpose

Started by TrinitroRoy, January 13, 2014, 07:26:31 PM

Previous topic - Next topic

TrinitroRoy

Quote from: Алексей on January 22, 2014, 09:50:31 PM
What was the purpose of this:


[State 181, Begin]
type = Velset
trigger1 = animelem = 1
y = 0


To debug this you can start by disabling things with Null and see what happens. This is is classic case of trial and error.
Okay, I tried you idea, and I decided to not use the PosSet trigger, since appearantly, there are the problems.
However, another problem is that the Gravity trigger ignores the VelSet triggers, which set the y vel to 0. How can I prevent that?
===My discord servers===
Unlimited Force HQ: https://discord.gg/hnyK7JZ
Mega Man Megamix Engine Help Server: https://discord.gg/Wjm9GYU

Touhou database (by Ryouchi):
http://mugenfreeforall.com/index.php?/topic/8257-touhou-project/
Quote from: bitter nothings on April 30, 2010, 09:35:51 PM
you are all small and can't grow manly sideburns

Алексей

I'm not sure what you mean by that. Gravity should only trigger when your pos y<0. VelSet should only be one tick long. That's why from the very beginning I was talking about using time triggers for the jump velset. The PosSet should only have a trigger of pos y > 0 so that you reset your position when you're below the ground. There should be a VelSet above it to stop your Velocity.


[StateDef ****]
type = S
movetype = I
physics = N

[State ****, Jump]
type = VelSet
trigger1 = animelem = 3 && vel y=0
y = const(velocity.jump.y)

[State ****, Gravity]
type = Gravity
trigger1 = pos y < 0

[State ****, Reset Vel]
type = VelSet
trigger1 = pos y>0
y = 0

[State ****, Reset Pos]
type = PosSet
trigger1 = pos y>0
y = 0


That should be all there is to it. I'm not sure why  it's causing you so much trouble.

-[Все слова это только слова.]-

TrinitroRoy

Quote from: Алексей on January 24, 2014, 12:16:24 AM
I'm not sure what you mean by that. Gravity should only trigger when your pos y<0. VelSet should only be one tick long. That's why from the very beginning I was talking about using time triggers for the jump velset. The PosSet should only have a trigger of pos y > 0 so that you reset your position when you're below the ground. There should be a VelSet above it to stop your Velocity.


[StateDef ****]
type = S
movetype = I
physics = N

[State ****, Jump]
type = VelSet
trigger1 = animelem = 3 && vel y=0
y = const(velocity.jump.y)

[State ****, Gravity]
type = Gravity
trigger1 = pos y < 0

[State ****, Reset Vel]
type = VelSet
trigger1 = pos y>0
y = 0

[State ****, Reset Pos]
type = PosSet
trigger1 = pos y>0
y = 0


That should be all there is to it. I'm not sure why  it's causing you so much trouble.
Okay I changed this:

[State 181, Gravity]
type = VelSet
trigger1 = pos y > 0 && vel y > 0
y = 0

[State 181, Prevent going through floor]
type = PosSet
trigger1 = pos y > 0 && vel y > 0
y = 0

to this:

[State 181, Gravity]
type = VelSet
trigger1 = pos y > 0 && vel y > -2
y = 0

[State 181, Prevent going through floor]
type = PosSet
trigger1 = pos y > 0 && vel y > -2
y = 0

and now, the problems are gone for some reasons...
...I know it's probably the wrong way to fix this problem, but screw it, the problem is fixed, and that's the important part.
===My discord servers===
Unlimited Force HQ: https://discord.gg/hnyK7JZ
Mega Man Megamix Engine Help Server: https://discord.gg/Wjm9GYU

Touhou database (by Ryouchi):
http://mugenfreeforall.com/index.php?/topic/8257-touhou-project/
Quote from: bitter nothings on April 30, 2010, 09:35:51 PM
you are all small and can't grow manly sideburns

Алексей

Lol, well that's fine by me. I'm not gonna nitpick semantics at this point. Maybe if you were working for me. >:D

-[Все слова это только слова.]-