Throwing problems.

Started by Bloodly, November 11, 2007, 10:15:18 AM

Previous topic - Next topic

Bloodly

Yet another problem from me.  It figures they're stacking up close to the end...

Anyway.  The move is meant to be as follows: a helper is created, traps the target for a time, then tosses them in the air(causing damage) before disappearing.

The helper works, the trapping works, the disapperence works.  The tossing....not so much.

---

;Helper's state
[Statedef 1031]
type = S
movetype = A
physics = S
anim = 1030
sprpriority = 2

[State 1031, Hit]
type = HitDef
Trigger1 = Animelem = 3
Trigger2 = Animelem = 4
Trigger3 = Animelem = 5
Trigger4 = Animelem = 6
Trigger5 = Animelem = 7
attr = S, NA
hitflag = M
sparkno = -1
p2stateno = 820
persistent = 1

[State 1031, Bind]
trigger1 = MoveContact
type = TargetBind
time = 40
pos = 0, 0

[State 1031, damage]
trigger1 = AnimElem = 8
Type = TargetLifeadd
value = -60

[State 1031, Throw]
Trigger1 = AnimElem = 8
type = TargetState
value = 1032

[State 1031, Destroy]
trigger1 = Animtime = 0
type = DestroySelf

;---

[Statedef 1032]
type = S
movetype = H
physics = N
velset = 0,-20
poweradd = 40

[State 1032, 1] ;Gravity
type = VelAdd
Trigger1 = 1
y = .4

[State 1032, 2] ; Recover near ground (use ChangeState)
type = ChangeState
triggerall = Vel Y > 0
triggerall = Pos Y >= -20
triggerall = alive
triggerall = CanRecover
trigger1 = Command = "recovery"
value = 5200 ;HITFALL_RECOVER

[State 1032, 3] ; Recover in mid air (use SelfState)
type = SelfState
triggerall = Vel Y > 0
triggerall = alive
triggerall = CanRecover
trigger1 = Command = "recovery"
value = 5210 ;HITFALL_AIRRECOVER

[State 1032, 4] ;Hit ground
type = SelfState
trigger1 = Vel Y > 0
trigger1 = Pos Y >= 0
value = 5100 ;Hit ground

---

Any ideas?

Thank you for your time.
\"So you have chosen....death.\"-Saruman.

PotS

Quote
[Statedef 1032]
type = S
Change to type=A.

Quote
[State 1032, 2] ; Recover near ground (use ChangeState)
type = ChangeState
Change to SelfState (despite what's written in KFM).


But the problem's probably this:
Quote[State 1031, Bind]
trigger1 = MoveContact
type = TargetBind
time = 40
pos = 0, 0

Maybe the target is still bound by the time you give him a velocity, because that Sctrl basically binds the target from the moment you hit him until 40 ticks after the helper leaves the state (though I don't know how TargetBind reacts when you remove the player using it). Try:
[State 1031, Bind]
trigger1 = MoveContact
trigger1 = AnimElemTime(8)<0
type = TargetBind
time = 40
pos = 0, 0
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.

Bloodly

...That didn't work.  It dropped them after the helper was gone.
\"So you have chosen....death.\"-Saruman.

Bastard Mami

errr... you are never giving your target a negative Y velocity.

Bloodly

type = S
movetype = H
physics = N
velset = 0,-20
poweradd = 40

Surely that should do it?
This is the throw frame, this is the one where it flies off.

Even if not, I've tried adding VelSets and Veladds just before on on the frame the throw state activates, too.  No joy.

I've got no clue at all why it isn't working.  The bind's fine, but no throw.
\"So you have chosen....death.\"-Saruman.

Bastard Mami

add a trigger to either the gravity sctrl or the selfstates to time >0, as the charcter does not get a chance to leave the ground. also, you have a changestate that should also be a selfstate.

Bloodly

You people have been very patient with me with all my questions.  I'm thankful. 

I'll see what happens.
\"So you have chosen....death.\"-Saruman.

PotS

Oops, I forgot to change something else...

[State 1031, Bind]
trigger1 = MoveContact
trigger1 = AnimElemTime(8)<0
type = TargetBind
pos = 0, 0
(No time parameter)
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.

Bloodly

#8
It worked out in the end.  Thank you.

...I am seriously learning to hate the VEL commands, though.  Why must they always disobey me?  Case in point: Another problem has come up.  I'm trying to do a lose pose when the match it over.  The initial pose is S.

Code is:

Trigger1=AnimElem=3
Type=VelSet
X=10
Y=-20

He's meant to be flying off, you see.

The animation plays as it should, but he doesn't MOVE.

I can't work out why.
\"So you have chosen....death.\"-Saruman.