A strange problem with TargetBind

Started by BwdYeti, November 10, 2007, 11:23:06 AM

Previous topic - Next topic

BwdYeti

I'm trying to make a... ceiling, basically. If the character goes above a helper that stays on the ceiling with

[State 995, PosAdd]
type = PosAdd
trigger1 = 1
y = - ScreenPos y

[State 995, PosSet]
type = PosSet
trigger1 = 1
y = ifelse(pos y > - 300, -300, pos y) ; minimum height of 300
x = parent, pos x

he gets PosSet to below the helper. That works fine. The problem is I need to make any targets do that too, and since it needs to be a posset type thing (so no momentum up is lost, they don't fall until gravity makes vel y < 0) I'm using TargetBind. The problem: when I do repeated attacks at the ceiling the opponent slowing begins falling faster.

[State -2, Hit Ceiling]
type = TargetBind
trigger1 = numtarget > 0
trigger1 = numhelper(789) > 0 ; ceiling helper exists, it always should anyway
trigger1 = target(0), pos y - target(0), Const(size.height) < helper(789), pos y
trigger1 = target(0), statetype = A
trigger1 = (target(0), vel y) < 0 ; target needs to be moving up
time = 1 ; needs to recheck every tick so they get free as soon as they're falling
id = 0
pos = ifelse(facing = 1, (target(0),pos x + 160) - (pos x + 160), (pos x + 160) - (target(0),pos x + 160)),(helper(789),pos y+(target(0), Const(size.height))-pos y)
; target maintains their pos x, their pos y is set to the ceiling's pos y + their height

Any one have any ideas why this happens? I'll upload the caracter as is to get it tested if necessary, but hopefully that's not needed.
I'm making exact as possible Bleach DS 2nd characters. Contact me if you have any ideas, suggestions, or whatever.
http://www.bwdyeti.com/mugen

1. Kon 98%
2. Byakuya 90%
3. Ikkaku 80%
4. Ukitake 0% Uki was always here and did not steal Kanonji's spot. >__>
5. Kanonji 0%
(ahahaha this sig is 5 million years old just pretend it doesn't exist)

PotS

Are you using ID=0 in any Hitdef? If not then get rid of that parameter in the TargetBind, if so then use numtarget(0) in its trigers instead. And add ignorehitpause.
I don't think that's the problem though, just pointing it out.

QuoteThe problem: when I do repeated attacks at the ceiling the opponent slowing begins falling faster.
Not sure I know what you mean, can you elaborate on it?
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.

BwdYeti

I'm not sure how that id works really, I have another copy of that sctrl below it because I assume I need two for p2 and p4 for it to work right in 2v2. However that needs to be done is what I intended. And I had an ignorehitpause, I just removed it to move that comment down in the post so things were more organized, it's in during actual testing. Anyway, onto the problem.

It seems... I'm doing a chaining normal that hits every... 8 ticks I think, with pausetime = 7,7 and air.velocity = 0,-4. As the number of hits increases the opponents y vel slowly increases/falls/makes the opponent go down. I put y vel in the character's DisplayToClipboard sctrl and when I tested with low gravity (.025) to see what happened with a large number of hits, when I start hitting it's -4, but after some 30 hits it's 0 on hit, and 40 it's clearly positive. (Interestingly the opponent still goes up a bit for few ticks even when y vel is positive the whole time) When I stop attacking the opponent falls sharply. With things normal, the opponent would visibly fall faster after some 7 hits. It still happens even if I don't chain the normals at full speed, and only resets if I jump cancel and start attacking again. (Maintaining the combo)
I'm making exact as possible Bleach DS 2nd characters. Contact me if you have any ideas, suggestions, or whatever.
http://www.bwdyeti.com/mugen

1. Kon 98%
2. Byakuya 90%
3. Ikkaku 80%
4. Ukitake 0% Uki was always here and did not steal Kanonji's spot. >__>
5. Kanonji 0%
(ahahaha this sig is 5 million years old just pretend it doesn't exist)

BwdYeti

Meh, with all the problems it has I'm just gonna have the opponent use my character's states 5020,5030,etc to make it work. Oh well.
If anyone has any ideas or cares enough to try and figure out why it happens I'll talk about it.
I'm making exact as possible Bleach DS 2nd characters. Contact me if you have any ideas, suggestions, or whatever.
http://www.bwdyeti.com/mugen

1. Kon 98%
2. Byakuya 90%
3. Ikkaku 80%
4. Ukitake 0% Uki was always here and did not steal Kanonji's spot. >__>
5. Kanonji 0%
(ahahaha this sig is 5 million years old just pretend it doesn't exist)

PotS

That is weird, each hit should just reset the opponent's velocity to his gethitvar...
Did you try this against more than one char (preferably one of them being KFM)? Or do you have TargetVelAdd somewhere in there?

In any case, using custom states as you suggest would work better in simul mode, but if you do that try not to limit the opponent much, i.e. send him back to his own states after hitting the ceiling so he can do whatever he's supposed to do.
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.

BwdYeti

No targetveladd and I tested against multiple people, the character himself, your Ryu, and KFM at least. What seemed to be happening, which makes no sense, is as if on hit the opponent's gravity was applied once for each of the hits so far (trying to come up with an answer and failing) I think setting the opponent to custom states will work better anyway, it fixes a problem I was ignoring about setting the opponent's yaccel only while getting hit (since setting a yaccel in a hitdef makes most opponents have that yaccel until they land or at least leave state 5040), and they'll only be in the character's states 5020, 5030, and 5035 at most.
I'm making exact as possible Bleach DS 2nd characters. Contact me if you have any ideas, suggestions, or whatever.
http://www.bwdyeti.com/mugen

1. Kon 98%
2. Byakuya 90%
3. Ikkaku 80%
4. Ukitake 0% Uki was always here and did not steal Kanonji's spot. >__>
5. Kanonji 0%
(ahahaha this sig is 5 million years old just pretend it doesn't exist)