HomeUser Control Panel (unavailable in archive)ForumsTutorialsArt GalleryResourcesMaps

Who's the target of the item...

07-10-2007, 10:25 PM#1
Tide-Arc Ephemera
I'm using an item as a one-use ability for a very powerful spell, I can cast it and everything, but it won't get detected.

I'm using GUI on UMSWE so is there any function to select the targeted unit, if not, a custom script line?
07-10-2007, 10:30 PM#2
Rising_Dusk
Use for the event "Unit starts the effects of an ability" and for the target use "Target unit of ability being cast."
For the condition, have it "Ability being cast is equal to <name of my ability that I gave to the item>"

Basically --
Trigger:
Collapse Events
Unit - Any unit starts the effects of an ability
Collapse Conditions
Ability being cast equal to <Item Ability Here>
Collapse Actions
Custom Script - //Do stuff for your item thingy here
07-10-2007, 10:48 PM#3
Tide-Arc Ephemera
Trigger:
GT Ungodly Magic
Collapse Events
Unit - A unit Starts the effect of an ability
Collapse Conditions
(Ability being cast) Equal to (==) ITEM Deadly Bolt (Neutral Hostile)
Collapse Actions
Wait 0.10 seconds
Collapse If (All Conditions are True) then do (Then Actions) else do (Else Actions)
Collapse If - Conditions
(Percentage life of (Target unit of ability being cast)) Greater than (>) 50.00
Collapse Then - Actions
Unit - Set life of (Triggering unit) to ((Percentage life of (Target unit of ability being cast)) - 50.00)%
Collapse Else - Actions
Unit - Set life of (Target unit of ability being cast) to 1.00
Unit - Order (Triggering unit) to damage (Target unit of ability being cast) for 50.00 using attack type Spells and damage type Normal.

I did something wrong... just I don't know what... it's trivially not damaging the target... and yes, I also checked the item is using the ability ITEM Deadly Bolt
07-10-2007, 10:53 PM#4
Rising_Dusk
Target Unit of ability being cast loses its reference after a wait.
Store the unit to a variable.
07-10-2007, 11:06 PM#5
Tide-Arc Ephemera
There were two mild errors in what I was scripting, and the variable fixed the second one, I found the first one though.

NO REP FOR YOU, no I'm not an ass, +Rep