HomeUser Control Panel (unavailable in archive)ForumsTutorialsArt GalleryResourcesMaps

Little trouble with issue order

07-08-2003, 06:33 AM#1
ZellDominiko
When a person casts a custom spell I created in a map I'm making, I obviously use a trigger to check the order and perform whatever actions necessary. But I want it to stop the unit if it is out of range of the thing it is casting on, so I said:

if ( DistanceBetweenPoints(GetUnitLoc(GetOrderedUnit()), GetUnitLoc(GetOrderTargetUnit())) > 850.00 ) then

call DisplayTextToForce( GetForceOfPlayer(GetOwningPlayer GetOrderedUnit())), "|cffffcc00You are too far away.|r" )
call IssueImmediateOrderBJ( GetOrderedUnit(), "stop" )
return false

endif

is there like a little wait that i have to add in before i issue another order, because this should work fine, but the unit still goes and tries to cast the spell.
07-08-2003, 03:55 PM#2
ZellDominiko
sorry, but i'm bumping this. i need to know this for my map if anyone can help
07-09-2003, 04:31 AM#3
Guest
Well in TFT there is an even you can use called
Unit - A unit Begins casting an ability
that should only set off if the unit has the mana and is in range.
07-10-2003, 08:22 PM#4
ZellDominiko
well i'm actually not using TFT to make this map. I don't even own it in truth. I want to make the map work for both regular War3 and TFT due to the lack of fun maps out there. What happens if I instantly move a unit to the location it's already standing, then? Would that stop from moving?
07-10-2003, 10:31 PM#5
Guest
The thing is if you search it in this forum the ability cast functions just don't work in ROC. You have to have a such a complicated trigger just for one spell its really not worth it your better off just getting TFT and making it work there.