HomeUser Control Panel (unavailable in archive)ForumsTutorialsArt GalleryResourcesMaps

help with few triggers! + rep

12-28-2013, 11:29 AM#1
shanghai
Trigger:
Death Pact
Collapse Events
Time - Every 2.00 seconds of game time
Conditions
Collapse Actions
Custom script: set bj_wantDestroyGroup = true
Set Temp_Unit = (Random unit from AI_Group)
Set Temp_Group = (Units in Arena Center <gen>)
Custom script: set bj_wantDestroyGroup = true
Unit - Order Temp_Unit to Undead Death Knight - Death Pact (Random unit from Temp_Group)
Custom script: call DestroyGroup(udg_Temp_Group)

Im trying to make an ai that use death pact.

So how do i set the ai group can some one show me the trigger pls?
12-28-2013, 01:19 PM#2
Fledermaus
Using another trigger:
Trigger:
SetupAIGroup
Collapse Events
Map initialization
Conditions
Collapse Actions
Unit Group - Add YourUnitHere! to AI_Group

Also both your set bj_wantDestroyGroup = true's are unnecessary.
The first one is destroying AI_Group after a unit has been chosen from it (bad, it means it'll only work once before the AI_Group is gone!).
The second is unnecessary because of the call DestroyGroup(udg_Temp_Group) at the end. You should only use one or the other.
12-28-2013, 03:40 PM#3
shanghai
+ rep thanks alot man.

Like this?

Trigger:
Death Pact
Collapse Events
Time - Every 0.50 seconds of game time
Conditions
Collapse Actions
Set Temp_Unit = (Random unit from AI_Group2)
Set Temp_Group = Temp_Group
Unit - Order Temp_Unit to Undead Death Knight - Death Pact (Random unit from Temp_Group)
Custom script: call DestroyGroup(udg_Temp_Group)

just one problem with the ai group? how does it check if there is computer or a player?
12-28-2013, 09:46 PM#4
Fledermaus
Well how were you planning on adding the units to it? It should be easy to only add the (I assume) computer owned units to it when they're created, or at map init.
Or did you mean the target?