| 02-27-2007, 02:34 AM | #1 |
There are functions with the names: JASS:native IssuePointOrder takes unit whichUnit, string order, real x, real y returns boolean native IssueTargetOrder takes unit whichUnit, string order, widget targetWidget returns boolean native IssueImmediateOrder takes unit whichUnit, string order 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 native IssueNeutralImmediateOrder takes player forWhichPlayer, unit neutralStructure, string unitToBuild returns boolean native IssueNeutralPointOrder takes player forWhichPlayer,unit neutralStructure, string unitToBuild, real x, real y returns boolean native IssueNeutralTargetOrder takes player forWhichPlayer,unit neutralStructure, string unitToBuild, widget target returns boolean What's the difference between the "Instant" and normal orders, and what should I use for widget instantTargetWidget? Additionally, what does the boolean return true or false for? Will it return true if the order is executed and false if it is not? Lastly, what do the "neutral" orders do? Why would one use them, and how do they differ from the others? |
| 02-27-2007, 07:16 AM | #2 |
JASS:function B2S takes boolean b returns string if b then return "true" else return "false" endif One by one and see what it isn't fitting. JASS:native IssuePointOrder takes unit whichUnit, string order, real x, real y returns boolean Takes a unit and a orderstring to order the unit to do orderstring at Location(x,y). Returns true if the action is achieved. (might be useful when debugging an order) Ex : call BJDebugMsg(B2S(IssuePointOrder(GetTriggerUnit(),"flamestrike",GetUnitX(GetTriggerUnit()),GetUnitY(Ge tTriggerUnit())))) JASS:native IssueTargetOrder takes unit whichUnit, string order, widget targetWidget returns boolean Same as IssuePointOrder (see at the top), expect it takes a widget as target (unit, item, destructable/doodad), and not a location. Ex : call BJDebugMsg(B2S(IssueTargetOrder(GetTriggerUnit(),"innerfire",GetTriggerUnit()))) Ex 2 : call BJDebugMsg(B2S(IssueTargetOrder(GetTriggerUnit(),"eattree",GetEnumDestructable()))) JASS:native IssueImmediateOrder takes unit whichUnit, string order returns boolean Takes a unit and a orderstring, and order the unit to cast "orderstring", which must be an order for the unit itself (like : War Stomp, Thunder Clap, Frenzy, ..<blabla>) Ex : call BJDebugMsg(B2S(IssueTargetOrder(GetTriggerUnit(),"frenzy"))) JASS: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 There's your question. It takes a unit, a string, but takes 2 widgets as parameters. I don't know for what is the second widget, but the first one is the target. JASS:native IssueNeutralImmediateOrder takes player forWhichPlayer, unit neutralStructure, string unitToBuild returns boolean native IssueNeutralPointOrder takes player forWhichPlayer,unit neutralStructure, string unitToBuild, real x, real y returns boolean native IssueNeutralTargetOrder takes player forWhichPlayer,unit neutralStructure, string unitToBuild, widget target returns boolean These are simple, it justs buys a unit from structure. |
| 02-27-2007, 11:37 AM | #3 |
In all of my mapping I've never had use for any of them but the first three. Granted, being curious never hurt, but some natives just don't do anything special in jass. They're just sort of... There. There have been a few topics asking about similar natives in the past. Considering seeking them out. |
| 02-27-2007, 01:02 PM | #4 | |
I'm also not sure on the exact differences between the natives, however what I can answer: Quote:
The boolean returns true if the order issued is a legal order. For example, ordering a unit to cast stormbolt on an invulnerable unit will return false. |
| 02-28-2007, 01:07 AM | #5 | ||
Chocobo- I understand the other orders, and was hoping to get more information on the "instant" ones. The neutral information was useful, though I don't know when I'd use it...Quote:
Quote:
+Rep to you all! |
| 02-28-2007, 02:28 AM | #6 | |
Quote:
The issue order with neutral buildings can be used if you want to control via triggers the ability to hire, buy items or buy abilities in neutral shops. These neutral order functions will return true if the buyer can get the item, unit or ability. |
| 02-28-2007, 07:04 AM | #7 | ||||
Quote:
Quote:
Double same answer :p Quote:
Not when you buy an ability, because you simply can't buy an ability. Quote:
Not only for the boolean returntype. It returns true only if.. : - Owner of Widget close to the shop has enough gold and wood (even if it isn't specified) - Shop has the unit/item available - The widget that is going to be buy must be available for the widget's owner (ex : Altar of Kings required for neutral heroes) - The widget must be able to buy in the shop ..I remember. |
| 02-28-2007, 04:37 PM | #8 | ||
Quote:
Quote:
|
| 02-28-2007, 04:53 PM | #9 |
Neutral may be because neutral hostile has differences in AI and order effects in some instances. |
