Age of Wonders II Heaven Julia with Gameplay background

Scenario Design

Spawning Guard Units Upon Entering Territory

Posted by: Orionshaolin (07-03-2002) on the AOW2 Scenario Forum

Here's a simple one I came up with to satisfy the "to easy to approach neutral territory and cities" (IMHO) problem for my map...

First, I wanted to spawn guard units. Easy enough, spawn units event, declare units, their spawn hex location, their activity (guard area) and their trigger (enter area, hex specs, radius) and conditions (random, 50%, after all, guards can't be everywhere at once!)

Then I decided that if you actually capture the city, the local guard structure would be halted, so I had to set an event that would create a true flag. Easy enough, event control flag, id#(make it up, I start with the number ONE, hehe, and work my way up the flags if necessary), flag set to true, and the trigger (enter area ( city center hex) and condition (own structure, using structure ID of city, which may be redundant, but I wanted to be certain that just attacking a city, and not winning it, wouldn't set the flag). This way, if you capture the city, the control flag is created and set to true.

Now, back to the conditions for the spawn, add an AND NOT condition, using the flag ID of the control flag you just created. Until the event happens, the control flag is false, cuz it doesn't exist. When the flag is created and becomes true, then the spawn reads the condition as (AND NOT (flag, now true) ) and sees that since the flag IS true, the condition is not met, and the event will no longer occur.

Yay for flags! Of course, you can add a control flag to just about any event via conditions. So get creative! :-P


Back to Event Scripting Resource Database Menu


Back to Scenario Design Main Menu

HG Logo

Headlines

» AoW1 Summer 2008 Mapmaking Tournament

» Interview Kirky Picardo

» Scenario update

» The making of...

» A new PBEM Singles Champion is crowned - Swolte!!

Poll

What unit most resembles you?

Halfling peasant

Undead Vampire

Human Knight

Tigran Prowler

Orcish Warlord

Archon Saint

Dwarven Engineer

Chaos Spawn

Results :: Other Polls

Age of Wonders

Looking for info about the original AoW?
Visit AoW Heaven!

AoWH Logo

HeavenGames Sites

» Main Portal

» Age of Empires

» Age of Empires 3

» Age of Kings

» Age of Mythology

» Age of Wonders

» Age of Wonders 2

» Battle for Middle Earth 2

» Caesar 3

» Caesar 4

» Children of the Nile

» Dungeon Siege

» Empire at War

» Empire Earth

» Emperor: RotMK

» Medieval 2: Total War

» Pharaoh

» Rise & Fall: CaW

» Rise of Legends

» Rise of Nations

» Rome: Total War

» Stronghold

» Stronghold 2

» SW: Galactic Battlegrounds

» Zeus