HomeUser Control Panel (unavailable in archive)ForumsTutorialsArt GalleryResourcesMaps

Is there a "when unit becomes the target of an ability" event trigger?

07-30-2003, 11:35 PM#1
Sardius
I am trying to make it so, when target grunt becomes the target of the ability Chaos Possess, it replaces the grunt with a chaos grunt... But I can't even find an event to start it.
07-30-2003, 11:49 PM#2
piRo-piOn
trig 1
e-unit is issued an order targeting a unit
c-target unit = grunt
c-issued order = "chaos posses"
a-set (unit array)ChaosCaster[(integer variable)ChaosInteger] = ordered unit
a-set (unit array)ChaosTarget[ChaosInteger] = target unit of issued order

trig 2
e-unit finishes casting an ability
c-ability = chaos posses
a-for each integerA from 1 to ChaosInteger
a---if ChaosCaster[ChaosInteger] = casting unit then
a------Replace ChaosTarget[ChaosInteger] with a Chaos Grunt using old units relative life and mana
a-set ChaosInteger = ChaosInteger + 1

trig3
e-unit is issued an order targeting a unit
c-ability = chaos posses
c-targeted unit != grunt
a-issue order "stop" to ordered unit
a-display text to owner of ordered unit "Can only target grunts"

This will work as long as chaos posses is cast less than 2065 (i think) time during the course of one map. The reason you need to do it this way is that this way will work if someone casts Chaos posses while a unit is attempting to get in range of another unit for Chaos Posses, so you can't take advantage of it in any way.
07-31-2003, 12:17 AM#3
Sardius
One problem, trigger 1 and 3... There is no "when unit is issued order targetting a unit" for generic units or specfic... there is only...

Targeting a Point
Targeting an Object
Targeting No Targert.
07-31-2003, 12:22 AM#4
Sardius
Also, this spell is being cast from the orc stronghold. The building will cast chaos posses, with a range of 500.
The the orc grunt will be replaced by a chaos orc grunt when chaos blood targets the grunt.
But I can't find the events you speak of, and trigger two seems it may work if it was the grunt with the ability.
07-31-2003, 05:55 AM#5
Sardius
Come on, someone has to know this...
07-31-2003, 07:09 PM#6
Sardius
I really need to know this ASAP
07-31-2003, 07:25 PM#7
Raleign
Simple. Unit=object.
07-31-2003, 07:27 PM#8
35263526
This trigger should work

Chaos Possess
Events
Unit - A unit Begins casting an ability
Conditions
(Ability being cast) Equal to Chaos Possess
(Unit-type of (Targeted unit)) Equal to Grunt
Actions
Unit - Replace (Targeted unit) with a Fel Orc Grunt using The old unit's relative life and mana
07-31-2003, 09:45 PM#9
Newhydra
no that won't work because units don't have a target when they begin casting an ability, an annoying bug
07-31-2003, 10:16 PM#10
Sardius
*sigh*

well if issue order taqrgetting an object does work with Unit, I can't tell the condition

Issued order = chaos possess, doesn't exsist, I can't find a place to select an ability in order comparison...

The triggers you gave me in the last post all exist, but it didn't work when I tried it in game, nothing happened when I cast it on the grunt...

Does anyone know what to do? and please give me conditions and events that actually exist...

Issue order targeting a unit does not exsist
and issued order = a select ability also does not exist.
07-31-2003, 10:40 PM#11
35263526
I think that my trigger might possibly work if you change 'begins casting' to 'finishes casting'
07-31-2003, 11:49 PM#12
Sardius
I had already tried that one, doesn't, I target the grunt, nothing happens.
07-31-2003, 11:54 PM#13
sleeth
I am also having a similar problem. I am trying have it so that when a unit is the target of an item ability, then manipulated item is givin to the targeted unit.
08-01-2003, 01:48 AM#14
Newhydra
it does sardius...issued order targetting an object covers orders issued targetting units, but doesn't cover orders issued targetting points (move to ___) or orders without targets (stop)
08-01-2003, 02:10 AM#15
Sardius
Alright, so that works then as an event, what condition do I use then if I have, issue order targetting an object, what condition follows...
the one above does not exist