YesNoOk
avatar

Want to hit my own helper, but not affect my team (Read 435 times)

Started by junkerde, March 07, 2019, 10:24:31 pm
Share this topic:
Want to hit my own helper, but not affect my team
#1  March 07, 2019, 10:24:31 pm
  • avatar
  • **

  • Online
.
Last Edit: April 19, 2019, 12:16:03 am by junkerde
Re: Want to hit my own helper, but not affect my team
#2  March 08, 2019, 12:04:23 am
  • ******
    • www.justnopoint.com/
You’ll probably need to replicate it by coding the interactions into the projectiles. Using proximity to the helper to detonate it.
Re: Want to hit my own helper, but not affect my team
#3  March 08, 2019, 12:14:46 am
  • ****
    • Peru
Like JNP said, it sounds like you're gonna have to use proximity to emulate a hit between the projectile and the gas cloud.

Since there is no direct way to measure the distance between two helpers, go to your gas cloud and projectile helpers and add ParentVarSet state controllers (different variable from each helper) that will constantly indicate their positions in X (this is assuming you're not using projectiles that can be shot down at an angle, that could get trickier since you'd need two more variables for pos y). The character will also have to have a variable that indicates the distance itself. Once that variable reaches a value that would represent a projectile being at hitting distance from the cloud, then you go to your projectile and make it changestate to its "death" animation. Add a playsnd for the hit and an explod for the hitspark, if any.

I strongly recommend you register the result as an absolute. so from the projectile, it'd be more or less like so:

(This is assuming you're using var(15) for the cloud position, var(16) for the projectile position and var(17) for the distance)

Code:
[State 1000, ChangeState]
type = ChangeState
trigger1 = parent,var(17) <= abs(parent, var(15) - parent, var(16))
value = 1001

Hope we helped!

P.S: Mods, sorry for the double editing, forgot the damn code tags
Millie, "Ozy and Millie" said:
"I think there are really three types of people: "Glass is half-full" sorts of people, "Glass is half-empty" sorts of people,
and people who will spit into the glass until that's fixed."
Re: Want to hit my own helper, but not affect my team
#4  April 17, 2019, 09:05:35 am
  • avatar
  • **

  • Online
.
Last Edit: April 19, 2019, 12:16:11 am by junkerde
Re: Want to hit my own helper, but not affect my team
#5  April 21, 2019, 07:52:16 pm
  • *****
  • The story begins with who's gonna win
    • USA
Hey. Don't remove your posts like that. In general it makes it hard to follow a conversation and is terrible. On this board in particular it makes it impossible for anyone else to benefit from this topic because now they won't have any idea if your problem actually matches theirs or not. Do this again and see the ability removed for good.
Back from the bellows of hell
Back from the back of a jail in a cell
Back from the common decrees to the common degree
Back to the streets from the East
Back to the belly of beast
Back to the place of my peace
Back to me holding my piece
Anything working disturbing that peace
Will certainly meet the deceased, capiche?