Age of Wonders II Heaven Julia with Gameplay background

Scenario Design
    Scripting Basics

SHADOW MAGIC SCRIPTING
Scripting Basics

by Talon-Thorn

Events | Triggers | Conditions | Conditions List | Units and Structures | Appendix


Part V: Using Units and Structures in Scripts

Some scripts, such as the Unit in Area condition and the Rebuild Structure trigger, allow the designer to build custom scripts that respond to a specific unit or structure in the game. The unit or structure is entered into the script by using it's unique id.

Each unit and structure has a unique ID that can be used to access it in a script. Right-click on the unit or structure, and select "edit" to see the property window.


Units have their ID shown on the unit in the Army properties window.

Structures have their ID shown at the bottom of the structure Properties window.

The unit or structure must be placed on the map for an ID to be assigned to it. Once added to the map, the designer can use the unit or structure in a script simply by typing its ID into the ID field. Press "enter" or click in another field to get the name of the unit or structure to show up (this helps in verifying that you typed in the correct ID).

Finding A Unit or Structure

When editing a scenario or viewing someone else's scenario, there is an easy trick to use to locate a unit or structure used in a script. First, select the script that has the unit or structure, then highlight/select the unit/structure ID. Now, to center the map on the selected unit or structure, simply right-click on the ID. The map will center on the unit/structure and show the following animation to indicate the unit/structure selected:

This concludes the user's guide to the scripting tools of the scenario editor. Hopefully, you now know all you need to know to start making custom events for your map.

Good luck and by all means have fun!


If you are looking for more information about scripts, check out the Appendix.


Author's Note: I have made my best effort in making sure that the information here is correct. I have tested each component before writing about it to ensure that it works as I say. However, it is possible that I could still have missed something or didn't write something clearly or correctly. Please feel free to let me know the correction so that everyone can benefit from the correct information. Talon-Thorn

(Editing and screenshots by BCH; additional editing and updated screenshots by Talon-Thorn)

Events | Triggers | Conditions | Conditions List | Units and Structures | Appendix

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