HomeUser Control Panel (unavailable in archive)ForumsTutorialsArt GalleryResourcesMaps

Trigger Driven Auto-Cast AI

04-02-2007, 03:22 AM#1
Castlemaster
Due to the unpredictability of standard AI commands, I have to do purely trigger driven AI for my map. As of know I have a wave of monsters with melee and healers. Problem is that I'm having trouble getting the casters to heal and not attack. It's important to note that I have a seperate trigger that refreshes a base attack command depending on the situation. The purpose of this trigger is to counter act that one and let the healer units heal.
Trigger:
Collapse Events
Unit - A unit Is issued an order targeting an object
Collapse Conditions
(Unit-type of (Target unit of issued order)) Equal to Walrus Healer
(Issued order) Equal to (Order(attack))
Collapse Actions
Collapse If (All Conditions are True) then do (Then Actions) else do (Else Actions)
Collapse If - Conditions
(Distance between (Position of WaveMonsterNumber[Wave6TempCount]) and (Position of WaveMonsterTarget[Wave6TempCount])) Greater than 450.00
Collapse Then - Actions
Set TempPoint = (Position of WaveMonsterTarget[Wave6TempCount])
Unit - Order (Picked unit) to Move To TempPoint
Custom script: call RemoveLocation (udg_TempPoint)
Collapse Else - Actions
Unit - Order WaveMonsterNumber[Wave6TempCount] to Hold Position
Walrus healer is the unit, and WaveMonsterTarget[Wave6TempCount] is a system I use to assign individual commands to units. My intention is that the unit will move towards his target, then when in range hold position and heal his allies (he has heal set as his autocast ability in the editor), or attack if they are full health.
04-02-2007, 04:40 AM#2
Dil999
Just looking quickly, (Unit-type of (Target unit of issued order)) Equal to Walrus Healer will say, 'If the targeted unit of the order is a walrus healer..'
I believe you want Triggering Unit. Unless the heal only works on walrus healers
04-02-2007, 12:28 PM#3
Castlemaster
yes, It has a healer and melee part of the wave, and the healer is the part I want to do something different.
04-02-2007, 01:32 PM#4
MaD[Lion]
wat he meant is tat (Unit-type of (Target unit of issued order)) Equal to Walrus Healer
means:
if the targetted unit is Walrus Healer, which here will mean tat if a Walrus Healer is being attacked then these actions run.