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

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