• 🏆 Texturing Contest #33 is OPEN! Contestants must re-texture a SD unit model found in-game (Warcraft 3 Classic), recreating the unit into a peaceful NPC version. 🔗Click here to enter!
  • It's time for the first HD Modeling Contest of 2024. Join the theme discussion for Hive's HD Modeling Contest #6! Click here to post your idea!

Doubt in AI script

Status
Not open for further replies.
Level 4
Joined
Jul 30, 2010
Messages
57
I would like to know if is possible to make some AI script where the workers have two build list with an ability to change then. What i mean is, if the script order the worker to build an altar (for example) but the altar is in the other list, is it possible to issue the worker to change the list and to build the altar after?
 

Dr Super Good

Spell Reviewer
Level 63
Joined
Jan 18, 2005
Messages
27,195
Its possible. If you can have many workers you just get the AI to have atleast 1 of each and use each as a separate pool of workers.

If you only have 1 worker, you just need to create a system which handles build piority and changes based on needs. For example if it must have an alter at a certain step, it changes to the alter form and makes it. After the alter it may need a stable, so it changes back to make it.

If you are very lazy, just order the AI to change very 15 seconds if it is not doing anything and only has 1 worker. For multiple workers the lazy approach would be just to make sure the AI has both types of worker available at any given time.
 
Level 4
Joined
Jul 30, 2010
Messages
57
go to AI EDITOR >>> BUILDING tab...but be sure to import everything via IMPORT in the GENERAL tab if you are building custom units, otherwise AI wont do what you want them to do...

I am talking about the trigger i must use for the AI. Which trigger i should use to check when the AI should build something in the other list.
I know how to change the building list with triggers i just don't know how to check when it's time to do it :/
 
Level 29
Joined
Mar 10, 2009
Messages
5,016
I am talking about the trigger i must use for the AI. Which trigger i should use to check when the AI should build something in the other list.
I know how to change the building list with triggers i just don't know how to check when it's time to do it :/

actually, if you are using AI editor, you cant ask the AI to build another OUTSIDE the building priority, coz they will just cancel them or leave that building INCOMPLETE...

if you use triggers, use an index system for that, but believe me its very complicated...AI editor is the best for building units using AI...
 
Level 4
Joined
Jul 30, 2010
Messages
57
actually, if you are using AI editor, you cant ask the AI to build another OUTSIDE the building priority, coz they will just cancel them or leave that building INCOMPLETE...

if you use triggers, use an index system for that, but believe me its very complicated...AI editor is the best for building units using AI...

Ok Ok i will try that idea of change every 5 minutes
Thanks anyway. :D
 
Status
Not open for further replies.
Top