collapse

Author Topic: A question on a helpers position to P2  (Read 415 times)

0 Members and 1 Guest are viewing this topic.

Offline Alexziq

  • Infinite Loyalist
  • *****
  • Posts: 2624
  • Last Login:November 10, 2017, 01:10:16 PM
    • Email
A question on a helpers position to P2
« on: May 18, 2009, 09:17:04 AM »
Okay I'm trying to code a helper, but its a helper that comes into strike p2 with punches and not a projectile. Now depending on where p1 stands into relationship to p2 currently can be hit or miss if p1 stands too far, or too close to p2.

Ive made the postype p1 and its obvious thats part of the problem, and Ive made the postype = back with a middle entrance, but again this is still hit or miss at best.

If I choose p2 as a postype the helper comes in from the wrong side on the right of the screen behind p2, and opposed to p1.

Is there a way to make sure the helper drops in front of p2 at the same position regardless of p2's location? Or is there a way when the postype=p2 to change the side that the helper comes in so that the helper faces p2 from the front instead of behind p2?

I'm sure it something simple, but I cant find anything in the Documents.



Offline Acey

  • Infinity Administrator
  • *
  • Posts: 9579
  • Country: United States us
  • Last Login:December 05, 2022, 10:43:15 PM
  • "Victory means nothing, the fight is everything."
    • Infinity Wiki - Acey
    • Email
Re: A question on a helpers position to P2
« Reply #1 on: May 18, 2009, 09:56:14 AM »
There are many ways to do it depending on the attack, if he's running out from the side I would set him to "back" like you said above, then make a "velset" to trigger when he's right in front of the opponent.

[State 0, VelSet] ;Stop in front of opponent
type = VelSet
trigger1 = p2statetype != A ;when opponent isn't jumping
trigger1 = p2bodydist x <= 20 ;When 20 pixles in front of the opponent
x = 0
y = 0

Then you make a changeanim or changestate into the attack animation when vel x = 0

Then you make another changeanimation or change state after the attack animation has finished to make him run off the screen.

Hope this helps.

Offline Alexziq

  • Infinite Loyalist
  • *****
  • Posts: 2624
  • Last Login:November 10, 2017, 01:10:16 PM
    • Email
Re: A question on a helpers position to P2
« Reply #2 on: May 18, 2009, 11:22:02 AM »
He's actually dropping in from the air so I'm not sure if that will look right or not. However if I increase the forward vel on the X the p2bodydist should stop him at the right location in front of p2, so that might work.

Am I right in thinking that?

Offline Acey

  • Infinity Administrator
  • *
  • Posts: 9579
  • Country: United States us
  • Last Login:December 05, 2022, 10:43:15 PM
  • "Victory means nothing, the fight is everything."
    • Infinity Wiki - Acey
    • Email
Re: A question on a helpers position to P2
« Reply #3 on: May 18, 2009, 11:36:44 AM »
yup, that would work.

Offline Alexziq

  • Infinite Loyalist
  • *****
  • Posts: 2624
  • Last Login:November 10, 2017, 01:10:16 PM
    • Email
Re: A question on a helpers position to P2
« Reply #4 on: May 18, 2009, 11:41:14 AM »
I think thats got it. I appreciate the help. One of these days I'll remember this stufff by heart. :thumbsup:

Tags:
 


* IMT Facebook

Help us by Donating!

IMT Discord

Join us at our Discord! Click the image below!

* IMT Shoutbox

Sorry, this shoutbox does not exist.

* Recent Posts

D2TD VS Showcase Thread by D2TD
[May 12, 2024, 10:20:11 AM]


Classic VS : Athena by ELECTRO
[May 10, 2024, 02:44:09 PM]


Ballroom Hallway (1.1 Only/AIGS) by Vegaz by LightFlare
[May 09, 2024, 11:53:48 AM]


Neon Light Force Demo by kyoman
[May 08, 2024, 12:50:05 PM]


Lasombra's IKEMEN Go Interactive Stages' WIP Topic and Releases by Lasombra Demon
[April 21, 2024, 12:09:20 PM]


Ultimate E. Honda + stage by ELECTRO
[April 18, 2024, 09:47:24 PM]


Sunset Beach (1.1 Only/AIGS) by Vegaz by LightFlare
[April 16, 2024, 06:55:00 PM]


Wonder Twins 2.0 by brucewayne74, Shining and Skhsato123 by brucewayne74
[April 05, 2024, 06:07:48 PM]


X-Men Training Room (Bright & Dark) Stage 1.1 & 1.0 by MatreroG
[April 05, 2024, 10:55:29 AM]


[WIP] Pocket Dimensional Clash 2 by O Ilusionista
[April 01, 2024, 11:03:03 PM]

* IMT Calendar

May 2024
Sun Mon Tue Wed Thu Fri Sat
1 2 3 4
5 6 7 8 9 10 11
12 13 [14] 15 16 17 18
19 20 21 22 23 24 25
26 27 28 29 30 31

SimplePortal 2.3.5 © 2008-2012, SimplePortal