HomeUser Control Panel (unavailable in archive)ForumsTutorialsArt GalleryResourcesMaps

Unit uses spesific item on a spesific enemy unit of type

12-06-2003, 08:12 PM#1
njord
I want to create an item with an ability that can only be casted on enemy zombies, and which will turn the zombies into villagers.

Does anyone have any idea of what i might do?
12-06-2003, 09:41 PM#2
zotax
Just use a dummy item spell that can only target undead, and then use triggers to detect when it is cast, and replace the target with a villager.
12-06-2003, 09:58 PM#3
njord
I have used a dummy item spell... My goal was that it should only target zombies, not all undead, but i fixed this by adding another player to play the zombies part. What I now having trouble with is to identify the unit targeted by the spell.
12-06-2003, 10:07 PM#4
FerretDruid
To get the target of a spell you need to base the ability (or make a dummy ability) based from a spell with an order string.. And use "unit is issued an order" "issued order equal to <yourability>" then set <spelltarget variable> target unit of issued order".

Order strings are shown right in in the Object Editor but sometimes they are not exactly as they show there, most are correct though. (In fact I haven't confirmed any are incorrect myself, but I've heard it enough times to believe it.)
12-07-2003, 02:08 AM#5
SpectreReturns
Just use the Dark Conversion and make it work backwards. Make Zombies have the race Commoner, then make dark conversion only work on commoners, and convert them into zombies. Not hard at all.
12-07-2003, 08:35 PM#6
Vexorian
Quote:
Originally posted by FerretDruid
To get the target of a spell you need to base the ability (or make a dummy ability) based from a spell with an order string.. And use "unit is issued an order" "issued order equal to <yourability>" then set <spelltarget variable> target unit of issued order".

Order strings are shown right in in the Object Editor but sometimes they are not exactly as they show there, most are correct though. (In fact I haven't confirmed any are incorrect myself, but I've heard it enough times to believe it.)


Unfortunally that is an item ability and it won't work, well in fact you can detect an item order when you don't use any condition so forget about conditions this time.
12-07-2003, 08:44 PM#7
weaaddar
Vex you usre?
I had a trigger just blindly read order commands. And it could not ever get the item orders.

I have a nasty workaround for it in my Tome Demo Map I just uled.

if you mean that it does count as an order you are correct but you can't get what order it was.
12-07-2003, 08:47 PM#8
Vexorian
It may only work for Unit is issued an order events, since you were using powerups they won't work as orders, I couldn't find an order id for drop item / give to another hero / sell but use item has its own order ids:

http://kattana.users.whitehat.dk/viewfunc.php?id=61
12-08-2003, 02:15 PM#9
njord
thank you, SpectreReturns, that really helped me alot.