• 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] Meaning of these AI code lines?

Status
Not open for further replies.
Level 3
Joined
Jan 7, 2019
Messages
6
I'm poking around AI files from Blizzard's campaign and other authors in Hiveworkshop. There are some lines I could not understand, so I need some help :p


Code:
call SetCaptainHome(ATTACK_CAPTAIN,-2924,-3633)
call SetCaptainHome(DEFENSE_CAPTAIN,-2184,-3257)

and

Code:
 call GroupTimedLife(true)

What do these lines mean? Thanks in advance
 
Last edited:
Level 8
Joined
Oct 3, 2008
Messages
189
That's from the last Night Elf expansion campaign isn't it? As far as I understood it it means that the "home" and attack locations of the AI will be set to those positions.

Code:
One of the biggest problems with the AI is the very inflexible use of captain widgets.
Currently, captain widgets are a "middleman" in charge of orders given to the computer player.
The AI player moves, or teleports, the captain widget to a target location and the units assigned to the captain follow.
There are two captains: attack and defense, each with it's own problems.
The units assigned to the defense captain will stay still even when given an order to change location, until one of three cases:
  aggroed,
  player town under attack,
  another unit is added to the defense captain.

From Kam's new Natives list

---

Not really sure what the second one does.
 
Level 30
Joined
Feb 18, 2014
Messages
3,623
Code:
call GroupTimedLife(true)
Well it's actually quite useful to set GroupTimedLife during the setup of your AI script. It ensures that the AI always includes timed units, like summons and parasites and such in attack waves. If you don't set this the AI doesn't make proper use of those units. For example if you have an attack wave with Meat wagons and Necromancers. The Necromancers raise skeletons from the corpses in the Meat wagons. This happens when the attack party is in combat. However when those skeletons are raised too far from the combat area they do nothing. If you set GroupTimedLife they will be included in the attack party and will automatically move into the combat zone. The same goes for summons from other races.
 
Status
Not open for further replies.
Top