YesNoOk
avatar

Helper return to player POS broken in 1.1, works in 1.0 (Read 625 times)

Started by junkerde, February 01, 2019, 09:33:24 pm
Share this topic:
Helper return to player POS broken in 1.1, works in 1.0
#1  February 01, 2019, 09:33:24 pm
  • avatar
  • **
I am editing Jirougaki's Super Mechagodzilla, you can hit a command to make this spaceship helper called "GARUDA"  comeoff his back and they become seperate. Then you can hit the same command again and wherever you are, teh helper: "GARUDA" will follow wherever your position is and come back. This is broken in 1.1, it follows in the air but never comes down to reattach. It's gotta be something simple like some change in syntax between versions.

But another big issue is, sometimes it randomly doesnt detach either, the sprite will detach but get stuck on the screen, and it wont go into the air. If you try to hit the command again to return it, it stays on the screen but then the players sprites go back to also having the GARUDA on his back, so there are 2 of them now.

Here are the codes in question:

For GARUDA returning back to the players position, works in 1.0

Spoiler, click to toggle visibilty

Garuda detaching state, it detaches but sometimes it doesnt fly up into the air like it should, it just gets stuck  on screen:

Spoiler, click to toggle visibilty

Garuda's state when hes not detached and still attached to the player:

Spoiler, click to toggle visibilty

I've attached images to show an example of this as well!

https://imgur.com/a/DldGVjD


And to be clear again, this all works correctly in version 1.0! But I want it working in 1.1! THank you!




Re: Helper return to player POS broken in 1.1, works in 1.0
#2  February 03, 2019, 12:04:20 am
  • *****
  • Shame on you!
    • USA
Working with my Samus I get some odd problems because of the localcoord. Because her sprites are so large I have her full hd. So her X velocities jump from 4 to 0. Basically 4 = 1. And mugen gets confused at 3.9 thru 0.1 and thinks it all = 0.

Something along those lines may be happening because of 1.1. Your base values aren't being scaled properly or something.

Are you getting totally different values in your displaytoclipboard between 1.0 and 1.1?
vVv Wheat Stage Released vVv
Re: Helper return to player POS broken in 1.1, works in 1.0
#3  February 03, 2019, 11:49:31 am
  • avatar
  • **
Thanks for the help! As far as I see everything except Y velocity is behaving normal. When the ship goes back to the player, you can see the Y velocity change because it is moving, but in 1.1 it just stays at 0. It seems to follow the x position the same though. Any ideas????
Re: Helper return to player POS broken in 1.1, works in 1.0
#4  February 03, 2019, 12:02:43 pm
  • *****
  • Shame on you!
    • USA
Make sure

[State 700, ‘¬“x‚ÌŽw’è]
type = VelSet
trigger1 = pos y < ceil(-55*root,const(size.yscale))
trigger2 = pos y >= 0
y = 0

Those values aren't being met. Otherwise I'll lock the velocity at 0. aka wont move.
And your Vel X sets are using a good ifelse/ifelse system and your Vel Y set is just using pos x? It shouldn't move up and down when it's moving left and right??
[State 700, ‘¬“x‚ÌŽw’è]
type = VelSet
trigger1 = vel y = 0
trigger1 = pos y <= ceil(-55*root,const(size.yscale))
trigger1 = rootdist x != 0
x = ifelse((rootdist x)=0, 0, ifelse((rootdist x)>0, 3.2, -3.2))

[State 700, ‘¬“x‚ÌŽw’è]
type = VelSet
trigger1 = vel x = 0
trigger1 = rootdist x = 0
trigger1 = pos y < 0
y = 3.2

It almost seems like those trigger1s want to be triggers 1, 2, & 3??
vVv Wheat Stage Released vVv
Re: Helper return to player POS broken in 1.1, works in 1.0
#5  February 03, 2019, 05:47:37 pm
  • avatar
  • **
Wow this is getting closer to working!! Thanks for the help! So changing it to trigger 1, 2, 3 and adding that line helped, the only problem is it wont return anymore if its exactly right above the player, it has to be at a distance to reconnect! im not sure if that has to do with it having issues with being at the same x position as me or it has something to do with the Y values.

If this helps, in the clipboard it does radically move about from 0.1 to 0.0 of distance X, but its always done this anyway.  If needed i attached the whole character, but honestly i think what i posted above is the only code that needs to be modified

Quote
https://drive.google.com/file/d/1UPR6liomsUWAQLImA78487HumaiAJ_Cs/view?usp=sharing
Re: Helper return to player POS broken in 1.1, works in 1.0
#6  February 04, 2019, 07:23:31 am
  • avatar
  • **
Re: Helper return to player POS broken in 1.1, works in 1.0
#7  February 04, 2019, 08:38:45 am
  • avatar
  • **
I found the solution!!! I believe it was something in rootdist that has changed! With the triggers numbered 1,2,3 instead as well, this is what I did next. This is the old line in statedef 20002:
Code:
[State 10000]
type = BindToParent
trigger1 = rootdist x < 10 && rootdist x > -10  ;<---old value was 4 and -4 respectively, but below youll see why I changed the paremeters
trigger1 = rootdist x = 0         ;<----------old value was x !=0[/color]
pos = 0,ceil(-55*root,const(size.yscale))
time = 1
ignorehitpause = 1

 Everything finally started clicking, the ship would connect everytime but not on the initial first disconnect of the round. So this is what I had to change next:

Code:
Statedef 20001
[State 10000]
type = BindToParent
trigger1 = 1
pos = 1,0        ;<----Old value was 0,0 , for it to work I had to change it to 1,0[/color]
time = 1
ignorehitpause = 1

Now anywhere I went and when I launched it worked perfectly as it should! But still graphically it wasnt right yet, so if you would wander far enough and tried to reattach, the object would, instead of going across the screen, just pop up next to your player. This was wrong, so I changed these parameters so you could see it clearly soar across the entire stage if need be to reattach:

Code:
[State 700, ‘¬“x‚ÌŽw’è]
type = VelSet
trigger1 = vel y = 0
trigger1 = pos y <= ceil(-55*root,const(size.yscale))
trigger1 = rootdist x != 0
x = ifelse((rootdist x)>0, 10.8, ifelse((rootdist x)<0, -10, 0))  ;<---original was "x = ifelse((rootdist x)=0, 0, ifelse((rootdist x)>0, 3.2, -3.2))"[/color]

[State 700, ‘¬“x‚ÌŽw’è]
type = VelSet
trigger1 = vel x = 0               ; <---Triggers like stated above have been numbered 1,2,3 instead[/color]
trigger2 = rootdist x = 0
trigger3 = pos y < 0
[color=red]y = 1.8                                  ;<----Was originally 3.2, but changed to 1.8, combined with the numbers above, it perfectly soars across the screen[/color]
Code:
somemorestuff below that was changed:
[State 700, ‘¬“x‚ÌŽw’è]
type = VelSet
trigger1 = rootdist x < 10 && rootdist x > -10
x = 0


EDIT: The garuda also does an aerial attack, statedef 21050, but you'll see the same paremeters above on the 3rd example I showed thats similar, just change the paremeters to be the same and it wont fly out of screen when you try to attach it after it glide attacks.
Last Edit: February 04, 2019, 09:20:15 am by junkerde
Re: Helper return to player POS broken in 1.1, works in 1.0
#8  February 04, 2019, 10:32:36 am
  • *****
  • Shame on you!
    • USA
So you got it working 100%?
If so, scroll down and hit the Solved button to put the green check up.
vVv Wheat Stage Released vVv