• Listen to a special audio message from Bill Roper to the Hive Workshop community (Bill is a former Vice President of Blizzard Entertainment, Producer, Designer, Musician, Voice Actor) 🔗Click here to hear his message!
  • Read Evilhog's interview with Gregory Alper, the original composer of the music for WarCraft: Orcs & Humans 🔗Click here to read the full interview.
  • Create a faction for Warcraft 3 and enter Hive's 19th Techtree Contest: Co-Op Commanders! Click here to enter!
  • Create a void inspired texture for Warcraft 3 and enter Hive's 34th Texturing Contest: Void! Click here to enter!
  • The Hive's 21st Texturing Contest: Upgrade is now concluded, time to vote for your favourite set of icons! Click here to vote!

[AI] Specific Script Hero Order

Status
Not open for further replies.
Level 22
Joined
Mar 16, 2008
Messages
981
There are separate natives for AI scripts but I'm wondering if I could throw something like this into the script and have the AI purchase a specific item when it acquires another specific item. Would it matter what part of the script I throw this into? Attacking section or building section?

JASS:
    if ( ( UnitHasItemOfTypeBJ(udg_Red_King, 'I002') == true ) ) and
    if ( ( GetPlayerState(Player(0), PLAYER_STATE_RESOURCE_GOLD) >= 3000 ) ) then
        call IssueNeutralTargetOrder ( GetPlayerID(Player(0), udg_King_Vendor, I015)

Or should I just do this with some elaborate GUI system? Thinking if the AI could handle something like the above it'd be easier just to add it to the AI's script.

Thank you.
 
Last edited:
Status
Not open for further replies.
Top