YesNoOk
avatar

P1 bind to a helper (Read 2527 times)

Started by sergeus, May 17, 2020, 12:55:14 am
Share this topic:
P1 bind to a helper
New #1  May 17, 2020, 12:55:14 am
  • ***
  • AVP Project
    • Spain
    • sergeusmugen.blogspot.com
Hi!

I´m working in one of my crazy special chars, and i want to do this:
The main helper can move arround the stage, and the player position must be always the same of that helper.
It´s like bind to parent, but  just the opposite. P1 is always invisible. The idea is to make P2 go always in the direction of that main helper.

I hope i have explain it enough clearly...
Thanks in advance!
Last Edit: May 17, 2020, 01:47:45 pm by sergeus
Re: P1 bind to a helper
#2  May 17, 2020, 07:41:53 am
  • *****
  • Shame on you!
    • USA

  • Online
When you say
  and the player position must be always the same of that helper.
Do you mean player 1, or player 2?
Also, are you having trouble moving the helper, or getting the character to move to it?
vVv Ryuko718 Updated 10/31/22 vVv
Re: P1 bind to a helper
#3  May 17, 2020, 07:58:18 am
  • ****
  • CPU Purple Heart
    • USA
    • https://www.pixiv.net/en/users/8108265
type = posset
triggerall = numhelper(****)
trigger1 = -insert condition here-
x = helper(****),pos x
y = helper(****),pos y

 This is pretty much a common hack to emulating bindtohelper. You can also add to or subtract from (i.e.: helper(****),pos x-100 will always have you 100 pixels away from that helper's backside since what side the helper is facing is factored in) the helper's pos to adjust how many pixels your character will be next to or away from the helper in question as well.
Re: P1 bind to a helper
New #4  May 17, 2020, 09:34:11 am
  • ***
  • AVP Project
    • Spain
    • sergeusmugen.blogspot.com
When you say
  and the player position must be always the same of that helper.
Do you mean player 1, or player 2?
Also, are you having trouble moving the helper, or getting the character to move to it?
I mean player 1, it´s nothing to do with player 2
The character is always invisible, and no playable (it´s a special char, as my Control Box or  SNES Aliens)

type = posset
triggerall = numhelper(****)
trigger1 = -insert condition here-
x = helper(****),pos x
y = helper(****),pos y

 This is pretty much a common hack to emulating bindtohelper. You can also add to or subtract from (i.e.: helper(****),pos x-100 will always have you 100 pixels away from that helper's backside since what side the helper is facing is factored in) the helper's pos to adjust how many pixels your character will be next to or away from the helper in question as well.

Oh, i didn´t think on this way... Sometimes i take the most difficult way and don´t see the easier one... I´ll test it including this code in State -2

Thanks to both of you!


EDIT:   It works perfectly, Thanks again!!
As easy as:
[State -2, position]
type = posset
triggerall = numhelper(1002) = 1
trigger1 = roundstate >= 2
x = helper(1002),pos x
y = helper(1002),pos y
Last Edit: May 17, 2020, 01:47:31 pm by sergeus