Chucking a Helpers target back to root (Read 1068 times)

Started by Yoshin222, December 16, 2021, 07:51:15 AM
Share this topic:
Chucking a Helpers target back to root
#1  December 16, 2021, 07:51:15 AM
  • ***
  • Getting better, still a long way to go
    • UK
This is a weird question, but tbh i am sincerely at the end of my wits with this, I have tried practically everything and nothing seems to work.
The long and short of the idea is that, using var(12), i can keep track of the current target. Perfectly fine for normal attacks, no bother whatsoever, BUT, when i try to use a Helper in this, that's where things get a lil...fucky
Idk if this is some mega obvious thing i missed somehow but here goes. My initial idea was to track the Target when the Helper made contact with the enemy. No dice. Next idea was to store that info in the Helper upon contact, and shoot it to the root. The maddening thing is IT WORKS, like, it shoots back the correct ID and all that, but corresponding code simply didn't trigger (example of the kinda code in question)

[State -2, Glass break sound effect];FA kill sound
type = PlaySnd
triggerall = PlayerIdExist(var(12)) ;enemy exists
triggerall = cond(numtarget,!(target,ishelper),0) ;Additional Safety
triggerall      = !(target, alive)
trigger1        = target,time = 1 ;enemy is in custom hit state
trigger1 = target,StateNo = 1323
value = 1323, 0
ignorehitpause = 1

I even tried using the Cond Exploit to shoot back the ID at the point the opponent enters the Target State

[state 1320, Chuck over target Data]
type = Null
;trigger1 = time <= 0
trigger1 = PlayerIDExist(gethitvar(fall.envshake.ampl)) ;Make sure enemy exists
trigger1 = gethitvar(fall.envshake.freq) != Teamside
trigger1 = PlayerID(gethitvar(fall.envshake.ampl)),cond(1,var(12) := 57,0)
value = 1324
ignorehitpause = 1
These do chuck the correct data back to my character, but the code just doesn't trigger. Am i missing something mega obvious here? Please let me know if i'm just being an idiot somewhere
Vid example: The projectile should always cause the glass break FX and sound to trigger, but it doesn't despite var(12) having the correct ID
Re: Chucking a Helpers target back to root
#2  December 19, 2021, 11:35:59 PM
  • ******
  • Hedgehog Whisperer
  • Red Bull addict
    • Spain
If the root hits the enemy, the target is owned by the root.
If the helper hits the enemy, the target is owned by the helper and the root does not have any target. Therefore any code from root using "target,blah" will not trigger.

As simple as that.

Have the helper spawn a projectile which actually hits the enemy (instead of the helper hitting), and then the target will be owned by the root.
XGargoyle: Battle posing since 1979  <-- Please click that link  <-- Donations welcome!
Re: Chucking a Helpers target back to root
#3  December 23, 2021, 12:14:22 AM
  • *****
  • Shame on you!
    • USA
Have you tried just putting in the PlaySnd into the helper?
vVv Mauru Mauru Released vVv