HomeUser Control Panel (unavailable in archive)ForumsTutorialsArt GalleryResourcesMaps

Trigger Help!

01-07-2003, 04:43 PM#1
MeccRipper
Ok iam Working hard on a map and have come to a Problem on how to do the trigger.

The trigger is supposed to work like when the Hero on the map steps on a region 19 monsters shall attack a camp. When the monsters are dead a cinematic shall apear. How to do this?
All the 19 monsters have to die and a Hero Called "Dwarf" are not allowed to die.

Please help!
01-07-2003, 04:58 PM#2
DKSlayer
I don't have the editor with me right now but here is what I would think.
For the hero part just create a event of
Dawrven Hero Die
action
End game or what you want.

For the Other part.
Event
Unit enters region Test
Conditition
Unit is Dwarven Hero
Actions
Group of Monsters attack camp

I can think of 5 ways to do the test of if the units are dead but I need to run, be back in a bit.
Good Luck
DKSlayer
01-07-2003, 05:45 PM#3
rwxr-xr-x
If you are spawning the monsters (not preplaced) you could test for them being dead as follows (requires them to be the only units owned by the attacker on the map):

EVENT
Unit owned by Player (comp) dies
COND
Number of units in (Units owned by Player (comp) equal to 0
Unit - Dwarven Hero is Alive equal to True
ACTION
play cinematic

If these are preplaced units, add those 19 monsters to a unit group and set it to the variable. In the examples below, monsterGroup is the variable of type Unit Group. You also need to create a region where these monsters are so you can select them, which I've named Monsters.

EVENT
Unit enters Region Test
COND
Unit is a Dwarven Hero
ACTION
Set monsterGroup = Units in Center of Region Monsters
Order monsterGroup to Attack-Move To Center of Region Camp

EVENT
Unit owned by Player (comp) Dies
CONDITION
Number of units in monsterGroup equal to 0
Unit - Dwarven Hero is Alive equal to True
ACTION
play cinematic
01-07-2003, 06:04 PM#4
MeccRipper
Thx for your answers just that i don't know how to make the 19 monsters to a Unit-Group Variable :bgrun:
01-07-2003, 06:24 PM#5
MeccRipper
Ohh......ok it worked fine didn't see you wrote how to do

Thx!
01-07-2003, 06:46 PM#6
DKSlayer
I deleted your other thread for you. You used to be able to delete it yourself by going to your first post and going to edit. Then in there you could delete it, not sure now.
Glad you were able to get it working and can't wait to see your map.
DKSlayer