• 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.

[Trigger] ability to target

Status
Not open for further replies.
Level 4
Joined
Feb 17, 2007
Messages
121
hey, i forgot how to do a trigger where a unit cast a ability like chain lightning and like a second the caster move instantly next to the target that was target by the chain lightning..??

Thanks for the help...
 
Level 3
Joined
Feb 14, 2009
Messages
23
event: a unit starts the effect of an ability
condition: ability being used = chain lightning
action:
set "point" - position of targeted unit of ability being cast
move casting unit instantly to "point"
call RemoveLocation(udg_point)
 
Level 4
Joined
Feb 17, 2007
Messages
121
Events
Unit - A unit Begins casting an ability

Conditions
(Ability being cast) Equal to Chain Slice

Actions
Set Point = (Position of (Targeted unit))
Unit - Move (Casting unit) instantly to Point


any help from that part?
 
Level 7
Joined
Jul 20, 2008
Messages
377
Don't use "Begins casting an ability," use "Starts the effect of an ability."

Next, add this to the end of your trigger:

  • Custom script: call RemoveLocation(udg_Point)
 
Level 4
Joined
Feb 17, 2007
Messages
121
yeah
its something more like
when the spell chain lightning is cast
the **hero** teleports next to the target
more like blink but with a damage at first start
like something i want something where when the hero teleports next to the target the ability will damage when he gets next to the target idk something like that..
 
Level 4
Joined
Feb 17, 2007
Messages
121
those spells can work but something what im not looking. i think what i got is good enough maybe ill post a video of that.
 
Level 15
Joined
Aug 14, 2007
Messages
936
Use the damage detection system plus a dummy and that would complete your understanding of advanced trigger.. heres some help

DO try my map if this helps ;P!

Trigger 1
When a unit starts and effect of an ability
ability that is cast is equal to Chain Slice (or something)
Then
(Fix leaks yourself)
set slicetarget = target unit of ability being cast
set slicecast = casting unit
Pick everyunit within 1000 range position of slice target
Trigger - Add to Trigger2 Specfic Unit Event- picked unit takes damage
Unit create 1 dummy at position of slicecast
order unit to cast chain lightning
add 0.5 generic timer to last created unit


Trigger2
Event is nothing
condition is (unit type of DamageSource is dummy)
Move slicecast to poistion of triggering unit


It works and you will smile too

Logic:

Trigger one detects when you cast the chain slice
.. Well trigger then adds units within 1000 range to trigger 2 to check if anyone of them is damaged
.. clearly when he cast chain slice, a dummy is created to cast chain lightning
.. now order the dummy to cast chain lightning and give a timer to he dies right after casting
so now its done for trigger one

Trigger2 having no event... why? you need to know who gets chained in game, which is impossible to detect when you are coding, therefore you add the event at trigger1 which we done it already..

Next, the condition checks if damage comes from the dummy's chain lightning
its a frequently asked question here: Why not just check for caster's damage?
Answer: Look if you check for caster's damage, attack will move you to the damaged attack, any other spells will as well, including immolation... it will move you like mad dog there!

ok now action is simple, it moves the caster that cast Chain Slice to the position of the damaged unit..

Logic is pretty simple.. Idea is the complicated one
 
Level 4
Joined
Feb 17, 2007
Messages
121
oh I see thanks alot man!
lol chaos, i did that before i kinda like runined the whole map so i remade it
haha
but then gotta remake everything ehh
 
Level 2
Joined
Jan 10, 2009
Messages
30
I think mengsta has got hes help now, right?
So, let's just let this topic die ;)
 
Status
Not open for further replies.
Top