HomeUser Control Panel (unavailable in archive)ForumsTutorialsArt GalleryResourcesMaps

Need help with trigger

10-25-2002, 04:04 PM#1
EvilNed
I need help for a map I'm making. You're supposed to win the map when you kill some specific buildings in the human base (the castle, barrack, arcane sanctum, two guard towers and the altar). But I don't know how to do it. Can anyone help?

And can anyone tell me how to make the AI train units? I made a trigger using the "Periodic Time Event" thingy, that ordered their barrack to train a Footmen each 40 seconds or something, but they never do.

Oh, and is there a way to copy a unit or building into another map? I'm working on a campaign, and its pretty hard to remake each unit on every new map.
10-25-2002, 09:44 PM#2
The_Cyberdemon1
OK, if the units are placed on the map at the start of the game, then it makes our work quite easy.

Make the trigger:
Event
Unit Dies-If unit (select 1 unit that needs to be dead)

Action
Set (Make a Boolean Variable) = true

Do that trigger for each of the buildings, making a different variable for each. Then make this trigger:
Event
Every 2 seconds of the game
Condition
If (Boolean Variable 1) = to true and (Boolean Variable 2) = true (keeping doing the "and" statement thing for each one, every single one)
Action
Player-Victory for player (whatever)

Hope that helps at all! If the units are not already placed, tell me, and i tell you what to do then.
10-25-2002, 10:24 PM#3
Draco
For the same units in a different map, you could copy-and-paste them or just export/import the units in the 'Unit Editor'
10-25-2002, 10:31 PM#4
ph33rb0
Why do every two seconds? That's bad use of events... do unit dies again with same condition and actions...
10-26-2002, 01:06 PM#5
EvilNed
And another question:

How do I transfer a hero, with all his XP and skills from one map in the campaign, to the next?
10-30-2002, 04:35 PM#6
Zedric
Make a Trigger that fires when a specific building dies, then have it set some variable to indicate that it is dead. Make these for each building that needs to die.

Make a "Testing" Trigger with no Event that checks to see if all the appropriate buildings are dead, then achieve Victory as necessary.

Now, make the original triggers (the building-specific ones) run the "Testing" Trigger as their last action.

Who needs Periodic events? :D