• Listen to a special audio message from Bill Roper to the Hive Workshop community (Bill is a former Vice President of Blizzard Entertainment, Producer, Designer, Musician, Voice Actor) 🔗Click here to hear his message!
  • Read Evilhog's interview with Gregory Alper, the original composer of the music for WarCraft: Orcs & Humans 🔗Click here to read the full interview.

[Unsolved] Chain Lightning: dead link

Status
Not open for further replies.
Level 9
Joined
Dec 21, 2006
Messages
490
hello there

problem 1:

i have a channeling chain lightning ability. you can cast it on a target, after 2 seconds a new target in range of the first target is targeted :d
this goes on aslong as the caster is channeling.
the ability can be cast by any player.
what i would need is a way to determine if any links inside the chain are dead and if so all links behind are set free and if the caster is still channeling a new target must be found by the last active chain link.
any ideas that are better than tracking each unit for each player in an array with triggers?

Create persistant (channeling) ---linked with init effect to --- Set --- A: Damage, B: Apply Buff C: Create Persistant --- C runs out--- Search Effect --- Set --- A ....


--------------One more problem-------------------
Problem 2:

Attaching the beam to the weapon. sounds easy since this is default BUT i had to change a little detail that seems to annoy me.
i have changed the beam frame from caster to target being able to react to some events happening on the targets.
i have tried everything : altering the container attach query, launchattachquery, launchsiteops, none of them work.
my model (dark templar) has a attachmentpoint weapon left. default beam actor and action is the archons one
 
Last edited:

Dr Super Good

Spell Reviewer
Level 64
Joined
Jan 18, 2005
Messages
27,258
Behaviours that are applied via the add behaviour effect retain knowledge of their source. It might even retain knowledge of previous sources as well.

The idea would be to create effect chains that do the following.
1. Chain growth where after X seconds of channelling with no next element in the chain it grows to a new unit.
2. Chain death where if a link dies it then destroys the future links.

2 May be possible with validators checking if the previous element in the chain still has the behaviour and is alive. If not then it removes the behaviour which will make the validator false for subsequent links.
 
Level 9
Joined
Dec 21, 2006
Messages
490
hm

so the "source" is the last unit in the chain? i am quite sure this would be the casting unit again, same like caster or origin, but i try again.

so if there is a source unit and no next unit it will cast again. but how to know if the unit has casted already and its target is dead. i loose all references to the target.

what do you think of this (if source is able to get the last unit):

the idea: a double linked list

unit A adds buff "One" to unit B, but only if no buff "Two" is on the unit.
unit B adds buff "Two" to unit A on init of buff "One"

it should be possible to validate the next unit in the chain on unit A with buff "two". if source is dead buff "two" will be removed and buff "one" is able to cast again.

only one problem, if two players cast this ability it might bug if the same units are targeted.

any ideas for my attachment problem?
 
Status
Not open for further replies.
Top