HomeUser Control Panel (unavailable in archive)ForumsTutorialsArt GalleryResourcesMaps

Normal, Instant, and Neutral orders

02-27-2007, 02:34 AM#1
Pyrogasm
There are functions with the names:
Collapse 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
Chocobo
Collapse 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.

Collapse 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()))))


Collapse 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())))


Collapse 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")))


Collapse 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.


Collapse 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
Rising_Dusk
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
blu_da_noob
I'm also not sure on the exact differences between the natives, however what I can answer:

Quote:
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?

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
Pyrogasm
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:
Originally Posted by Rising_Dusk
There have been a few topics asking about similar natives in the past.
Considering seeking them out.
That I will do.

Quote:
Originally Posted by blu_da_noob
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.
As I surmised.

+Rep to you all!
02-28-2007, 02:28 AM#6
moyack
Quote:
Originally Posted by Pyrogasm
There are functions with the names:
Collapse 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?
  1. Can be used to give to the unit order like move or attack in that point.
  2. Can be used to cast a spell on the target widget (widget can be a unit, item or destructable)
  3. Can be used to stop a unit or cast instant spells like war stomp.
  4. I don't know
  5. I don't know
  6. Used to hire a specific unit or cast an ability in a neutral building for a player. This function will return true if a unit owned by a player has been selected by the neutral shop.
  7. The same but specifying the location. One example is using the Reveal ability in the Globin Merchant building.
  8. The same but specifying the target unit to affect.

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
Chocobo
Quote:
Originally Posted by Chocobo
Returns true if the action is achieved. (might be useful when debugging an order)

Quote:
Originally Posted by blu_da_noob
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.

Double same answer :p


Quote:
Originally Posted by moyack
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.

Not when you buy an ability, because you simply can't buy an ability.


Quote:
Originally Posted by moyack
6. Used to hire a specific unit or cast an ability in a neutral building for a player. This function will return true if a unit owned by a player has been selected by the neutral shop.

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
moyack
Quote:
Originally Posted by Chocobo
Not when you buy an ability, because you simply can't buy an ability.
OK, to keep the precision, to pay to the neutral building for casting an ability. One example is Reveal ability in the Globin Laboratory.




Quote:
Originally Posted by Chocobo
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.
that's correct, thanks.
02-28-2007, 04:53 PM#9
Captain Griffen
Neutral may be because neutral hostile has differences in AI and order effects in some instances.