HomeUser Control Panel (unavailable in archive)ForumsTutorialsArt GalleryResourcesMaps

Unit - position of target unit of ... ???

03-13-2004, 04:55 PM#1
-={tWiStÄr}=-
The action
Code:
Region - Center region<gen> on (Position of (Target unit of ability being cast))

doesnt work right. im using it because like, where the unit gets hit by my spell based off of storm bolt, I create a unit. the unit is created in the region... but the region never moved. and when i use Location of abillity being cast or something like that, it just make the unit at the center of the map, lol which happens to be right where the target is, so i was like all confused. and when i try
Unit - Create 1 Flame for Player 1 (Red) at (Position of (Target unit of ability being cast <gen>) facing Default building facing degrees
theres the same effect.
03-13-2004, 05:19 PM#2
ThyFlame
Put a small wait between when the spell begins casting and where you use target of spell being cast
03-13-2004, 05:43 PM#3
-={tWiStÄr}=-
Huh? that makes like no sense...
03-13-2004, 05:49 PM#4
dataangel
If it's putting it at the center of the map, that means you're not using a casting event. Target of ability being cast won't work with an order event, if that's what you're using. Copy as text the whole trigger here.
03-13-2004, 05:53 PM#5
Kamux
Try storing the unit in a variable.
03-13-2004, 06:07 PM#6
-={tWiStÄr}=-
i am using a casting event. ill try the variable... but its gonna be local ^_^ because i have way to many variables that are for like 1 trigger.

edit: ok, I tried a variable, and the game just doesnt want it to work. i set the variable "i" to equal the target unit of ability being cast, then told the unit to be created at posistion of unit (i)... but the unit wasnt created anywhere.
03-13-2004, 08:19 PM#7
Grater
Are you using "Finishes casting an ability" ? IIRC the target point/unit doesn't work for that. Use starts the effect of instead.
03-13-2004, 09:24 PM#8
-={tWiStÄr}=-
hmm... ok. but theres always the glitch where they can hit stop really fast :(
edit: nm... i guess thats only for issued order.
03-13-2004, 11:07 PM#9
Vexorian
When you move a region (rect) the already registered enter / leaves events won't work (they will work with the previus place of the rect)

You have to add the enter event to the trigger after moving the rect

also you can use target point of ability being cast to get the position of the affected unit
03-13-2004, 11:52 PM#10
Grater
To clarify the difference between the events:
Begins casting an ability: The unit is thinking seriously about casting the ability, this is when the animation starts. But the cast can still be stopped before the mana is deducted.
Starts the effect of an ability: The moment the unit actually starts casting, the mana cost is deducted and the cooldown starts.
Finishes casting an ability: The casting animation ends naturally.
Stops casting an ability: The unit is rudely interupted by a stormbolt to the head, or a stop order.
The last two events must be used together, because if one fires, the other wont. So if you use the "Finishes casting an ability" and the unit gets stopped after "Starts the effect of an ability" the mana cost will be deducted, but your trigger wont fire.

Basically "Starts the effect of an ability" is the only event to be trusted. (ofcourse there are a few instances you need the other events, generally for channeled or multi-part spells)
03-13-2004, 11:57 PM#11
Vexorian
Just to clarify Stops casting an ability will always fire even if the unit finished casting the ability with no problem, and finishes / stops don't have event responses.

Cast / Channeling are worthless, unless you want to stop spells with a restriction (but you could use order events for that)
03-14-2004, 01:09 AM#12
-={tWiStÄr}=-
ya, i think i ended up using Unit starts effect of ability