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

[JASS] Make a AI controlled unit purchase from a shop (AI?)

Status
Not open for further replies.

TKF

TKF

Level 19
Joined
Nov 29, 2006
Messages
1,267
Does it exist any scripts that makes a unit purchase from a shop, forcing an AI player to BUY a unit from a certain shop. In my map control panels "sells" units, so when you buy them you activate the panel. I want an AI to activate those panels, but I don't find any functions which can make it happen?

All the AI functions in the map it controlled by triggers and functions. I have no AI scripts.


Is there a code for doing that? A code which makes a unit buy a unit from a shop? Rep+ for useful help.

Closest thing I get is to select that "console" unit, I lack the step of making it buy the unit triggerwise.



(All questions related to AI buy mercenaries is unanswered which I googled. So is this impossible even with a jass script?)
 
Level 4
Joined
Sep 18, 2007
Messages
104
You could try to fake buy it by adding the unit and subtracting the money. I really couldn't figure it out either. If you can get it to select the shop you could also force the player to press the hotkey for the buy.
 

TKF

TKF

Level 19
Joined
Nov 29, 2006
Messages
1,267
You could try to fake buy it by adding the unit and subtracting the money. I really couldn't figure it out either. If you can get it to select the shop you could also force the player to press the hotkey for the buy.
I tried the force player hotkey thing, but it didn't work out for me :/

I made a workaround instead which was quite lot of work.
 
Status
Not open for further replies.
Top