HomeUser Control Panel (unavailable in archive)ForumsTutorialsArt GalleryResourcesMaps

Making a Unit cast an ability

09-27-2007, 05:24 AM#1
TEC_Ghost
Am I just an idiot (Probably the problem) or can you not make units cast custom abilities?


Collapse JASS:
 call IssueImmediateOrderBJ( gg_unit_hfoo_0000, "A000" )

Sounds about right...but Noooooo doesn't work.

Any knowledge on this one?
09-27-2007, 05:48 AM#2
Pyrogasm
You must order it to cast the ability the new ability is based on. So if you created a new spell based off of Thunder Clap, you'd do this: call IssueImmediateOrder(gg_unit_hfoo_0000, "thunderclap").
09-27-2007, 05:50 AM#3
Av3n
Its not the ability its the order string to use it and its the field: Text - Order String - Use/Turn On. then you got these fellas:
Collapse JASS:
native IssueTargetOrder takes unit whichUnit, string order, widget targetWidget returns boolean
native IssuePointOrder takes unit whichUnit, string order, real x, real y returns boolean
native IssueNeutralImmediateOrder takes player forWhichPlayer, unit neutralStructure, string unitToBuild returns boolean
native IssueNeutralTargetOrder takes player forWhichPlayer,unit neutralStructure, string unitToBuild, widget target returns boolean
native IssueBuildOrder takes unit whichPeon, string unitToBuild, real x, real y returns boolean
native IssueInstantPointOrder takes unit whichUnit, string order, real x, real y, widget instantTargetWidget returns boolean
native IssueInstantTargetOrder takes unit whichUnit, string order, widget targetWidget, widget instantTargetWidget returns boolean
I think thats it unless you count the BJ specifics. There are id ones as well when you use an order id instead of an order string

-Av3n
09-27-2007, 05:51 AM#4
TEC_Ghost
Wont this cast the original spell though? I'm using custom abilities.

[edit] Ok cool it works, But what exactly are the Widgets? What would I set for one.
09-27-2007, 06:15 AM#5
Av3n
widgets = units, items, destructables

-Av3n