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

Few basic questions.

Status
Not open for further replies.
Level 9
Joined
Nov 19, 2011
Messages
516
Got another problem with AI. Wrong goldmine set as own.
attachment.php
AI starts getting gold from top one goldmine. Not from own. :/
 

Attachments

  • Untitled.png
    Untitled.png
    10.7 KB · Views: 129
Level 5
Joined
Feb 3, 2012
Messages
107
the picture is quite unclear. should they be at the bottom of the map?
if u have made custom starting units, ull have to change the starting location of the AI. it is likely that it was automatically generated there when u save the map, so the AI thinks that their home base should be there, hence they gather from there. u can replace a starting location at the bottom gold mine and maybe that would fix it.

and making a trigger to destroy a specific tree won't interfere with the AI, but the AI can interfere with the trigger by recalling the unit told to destroy the tree back to base.
hoped it helped
 
1) No, AI units attack enemy units, not trees, you should trigger that...

2) In the object editor, press CTRL+D then you can see it's value (4 digit), like hpea, hfoo, hkni etc...that's the unit type, if you create a custom unit, the h000,h001 will appear...
it will be declared in jass as integers, so instead of unittype, it can be is...
local integer peasant = 'hpea'
 
Level 9
Joined
Nov 19, 2011
Messages
516
@0neM4n4rmy

Its not custom race. Its not even replaced starting location. Just in one melee map AI can't see which goldmine is closer. This is Keys To Dula...sth. Orcs and humans just dies in creeps camp, undead and nightelf stays and not doing anything. :/ You can check it. If you will set all cpu players to undead, 3 or 4 of them will not gather gold. (You will see it on scoreboard.)
 

Attachments

  • (10)Keys KAZA v1.31.w3x
    577.3 KB · Views: 40
1st. Do you mean the AI editor ?

2nd.
JASS:
function example takes nothing returns nothing
     local unittype id = 'hpea'
endfunction
but note that at the end of the function, that local never exist unless you set a global to this local value.

this is wrong...

unittype in jass are things like UNIT_TYPE_HERO, UNIT_TYPE_DEAD etc, the 'hpea' is an integer...
 
Status
Not open for further replies.
Top