HomeUser Control Panel (unavailable in archive)ForumsTutorialsArt GalleryResourcesMaps

Order Unit To Cast Ability With No Order ID?

02-15-2008, 09:28 PM#1
Brash
I have this trigger that feeds back any single target spell that is cast on a unit and records their current order so that that spell is given to another unit and is issued that same order to get them to cast the same spell.


So like if unit 1 polymorphs unit 2.. both the ability and the current orders are recorded to a variable.. then unit 2 is given the ability event spell and is issued the order of unit 1's recorded current order


The problem is, there are a few single target spells that seem to have no order associated with them. The one i am looking at in particular is the Wand of Illusion item ability..

I have this ability modified into a regular unit spell.

and the trigger records the correct ability but no order id. The order variable on that spell is reporting null.

how might i solve this?
02-15-2008, 09:52 PM#2
moyack
Simple, add to the OrderID field the string value, and voila
02-15-2008, 10:05 PM#3
Brash
You mean in the object properties? where it says "text - Order string - use/turn on" and it shows None?

I've looked in the list and dont see illusion in there.. so i tested with banish by setting that value from none to banish.. and it's reporting back to me null still.

I tried also setting all 4 of those values to banish and still nothing. Should I try a different one?
02-15-2008, 10:17 PM#4
Vexorian
Quote:
Originally Posted by moyack
Simple, add to the OrderID field the string value, and voila
This is wrong.

--

Also , Brash, all abilities have order ids. Please get used not to use order strings and to avoid confusing begin calling things to their names, and to fix your issue, use the order id instead.
02-15-2008, 10:33 PM#5
Brash
Quote:
Originally Posted by Vexorian
This is wrong.

--

Also , Brash, all abilities have order ids. Please get used not to use order strings and to avoid confusing begin calling things to their names, and to fix your issue, use the order id instead.


Hm, I didn't know of this. I work in gui and i see nothing there related to "Order ID' specifically so that is why i assumed this was really another word for "string"

what do you mean by calling things to their name?

and how to i get the "order Id" in gui? Or must i use jass to get this? I'd like to set it to a udg_var.

here is what i've been using based off of strings:

The spell is Shell and it is based off of the spell in Final Fantasy 2 for snes. I want stuff to bounce back. and it works perfect except for a few spells that have no string orders.

Trigger:
Shell
Collapse Events
Unit - A unit Starts the effect of an ability
Collapse Conditions
Collapse Or - Any (Conditions) are true
Collapse Conditions
((Target unit of ability being cast) has buff Shell (Extra) (Destroyer)) Equal to True
((Target unit of ability being cast) has buff Shell (Destroyer)) Equal to True
(Unit-type of (Casting unit)) Not equal to Dummy Hero
(Unit-type of (Target unit of ability being cast)) Not equal to Dummy Hero
(Target unit of ability being cast) Not equal to No unit
(Casting unit) Not equal to No unit
Collapse Actions
Set Shell_CastingU = (Casting unit)
Set Shell_TargetU = (Target unit of ability being cast)
Set Shell_Ability = (Ability being cast)
Set Shell_Posi = (Position of Shell_TargetU)
Unit - Create 1 Dummy Hero for (Owner of Shell_TargetU) at Shell_Posi facing Default building facing degrees
Set Shell_DummyU = (Last created unit)
Unit - Add a 10.00 second Generic expiration timer to Shell_DummyU
Animation - Change Shell_DummyU flying height to (Current flying height of Shell_TargetU) at 1000000000.00
Unit - Add Shell_Ability to Shell_DummyU
Unit - Set level of Shell_Ability for Shell_DummyU to (Level of Shell_Ability for Shell_CastingU)
Set Shell_Order = (Current order of Shell_CastingU)
Set Shell_OrderString = (String(Shell_Order))
Custom script: call IssueTargetOrderBJ( udg_Shell_DummyU, udg_Shell_OrderString, udg_Shell_CastingU )
Custom script: call RemoveLocation( udg_Shell_Posi )
02-15-2008, 10:50 PM#6
moyack
Quote:
Originally Posted by Vexorian
This is wrong.

--

Also , Brash, all abilities have order ids. Please get used not to use order strings and to avoid confusing begin calling things to their names, and to fix your issue, use the order id instead.
Ok, there are some abilities that don't have assigned by default an order id, so you add the one which correspond more properly. One example is finger of Death, you can't issue it as is, but if you add the order id to the ability, you can. At least I had this experience recently, and I solved it in that way.
02-16-2008, 12:09 AM#7
Brash
Edit>

I think i got it!

Finally.

Trigger:
Custom script: set udg_Shell_OrderID = GetUnitCurrentOrder( udg_Shell_CastingU )
Custom script: call IssueTargetOrderById( udg_Shell_DummyU, udg_Shell_OrderID, udg_Shell_CastingU )

that seems to target the unit based on the integer of the spell. god that was driving me nuts. thanks guys