HomeUser Control Panel (unavailable in archive)ForumsTutorialsArt GalleryResourcesMaps

spell trigger help!!!!!

10-04-2003, 10:38 PM#1
drezman
im trying to make a spell that would turn certain units into other certain units.
i made a dummy spell and im trying to make triggers do the rest, but i cant get it to work. im trying to get it to when ability is cast, ability equal to ....., if unit equals lets say peasant replace peasant with super peasant. how would i do this?
10-04-2003, 11:05 PM#2
drezman
what im trying to do exactly is make a spell that would change lets again say, if used on a peasant, it would turn it into a super peasant. ive been using a dummy spell though, and trying with triggers, but i havent had any luck so far.
10-05-2003, 12:24 AM#3
drezman
can anyone help me with this?
10-05-2003, 05:07 AM#4
Ligature
Okay... you'll need a unit array. Then you'll need to set sequential custom values of all units that can have this ability as they're being created/trained/whatever...

Then write a trigger that catches orders to cast this ability and sets the unit array member at index "custom value of ordered unit" to "Target unit of issued order."

Then a final trigger that runs on "Unit finishes casting an ability" that checks what kind of unit is in the unit array at index "custom value of Casting unit" and if it's what you want, replaces it with whatever you like.