HomeUser Control Panel (unavailable in archive)ForumsTutorialsArt GalleryResourcesMaps

change order ID before cast. Possible?

05-21-2010, 10:10 PM#1
Darkrider
The other day somebody suggested me and idea, which consist of making a "confusion" state where a player orders a unit to move to some place and it answers confused by going anywhere. So far with walk and those orders i will not have major problems. The thing is when it comes to spells. If the spell is triggered, i will have to modify the code. The real issue comes if the spell fires like a normal WC3 ability. I can't seem to find a way to do it.

I tried to re-issue the kind of order (storing the order ID into a variable) to the unit. But couldn't even test the map (I used custom script for that inside GUI using JNGP'S "Jass script" option)


Any idea?

PS: For a better understanding of what i want to accomplish. Imagine Muradin casting Storm bolt but instead of firing it to the targeted unit, it fires it to some random unit from units in range.
05-21-2010, 11:44 PM#2
Deaod
On spell order issued, reissue order targeting another unit/point.
Id make a list of order ids that are normal orders (ie. not spells).
05-22-2010, 03:15 AM#3
Darkrider
Then... it should end up like this?

Trigger:
reorder unit
Collapse Events
Unit - A unit Begins casting an ability
Collapse Conditions
(Ability being cast) Equal to (==) Storm Bolt
Collapse Actions
Set OrderID = (String((Issued order)))
Custom script: call IssueTargetOrder( GetTriggerUnit(), udg_OrderID, GetSpellTargetUnit() )

i was using a "order type" variable instead of a string one. Thats was my error

Thanks Deaod ^^