collapse

Author Topic: A question on a helpers position to P2  (Read 443 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
[November 24, 2024, 09:12:03 AM]


Marvel vs. Capcom: Eternity of Heroes REMAKE Game Update 1.3.0 - N.A.O.H. by LightFlare
[November 21, 2024, 09:44:09 PM]


Terrordrome: Rise of the Boogeymen Extended Version ( jeepers creepers) version by leonardo
[November 19, 2024, 10:22:47 PM]


Hill of the Nameless(1.1 Only) by Vegaz by LightFlare
[November 19, 2024, 10:50:39 AM]


Golden Axe Returns by gokudo99
[November 19, 2024, 03:59:31 AM]


Barkley Shut Up and Jam! Stages by Vegaz by LightFlare
[November 12, 2024, 11:26:21 AM]


[BOR] _Avengers United Battle Force_ by O Ilusionista
[November 11, 2024, 12:35:24 PM]


Eternal Lament Stage 1.1 & 1.0 by O Ilusionista
[November 11, 2024, 12:34:54 PM]


MatreroG's Stages W.I.P. Concepts by MatreroG
[November 11, 2024, 07:00:56 AM]


Spooky House(1.1 Only/AIGS) by Vegaz by LightFlare
[October 31, 2024, 11:31:36 AM]

* IMT Calendar

November 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

SimplePortal 2.3.5 © 2008-2012, SimplePortal