Overview
Applying Programming Concepts into AOE 2 TriggersConcept 1: Booleans Type A: (Area Based) (If Object In Area / If Object Not In Area) AOE 2 Trigger Concepts as Programming Booleans > True or False Statements > Simple SwitchesMore coming soon including arrays, integers, procedures, functions, activator/deactivators, value checks, lists and more.
!PC1A: (PC) Programming Concepts (1) Booleans (A) Area Based
Bumis/Xbumis/Killbumis66 7/20/15
Find more at:
[link]
[link] (steam guide)
[link]
steamcommunity.com/profiles/76561198110699788/myworkshopfiles/
Find more at:
[link]
http://imgur.com/EhbnP69
RTF, Zip and HTML version of guide
[link]
=============================================================
!PC1A: (PC) Programming Concepts > (1) Booleans (A) Area Based
(1-10?) Difficulty == 3
Applying Programming Concepts into AOE 2 Triggers
Concept 1: Booleans
Type A: (Area Based) (If Object In Area / If Object Not In Area)
AOE 2 Trigger Concepts as Programming Booleans > True or False Statements > Simple Switches
+ Headnote:
– I’m going to be starting an entire text/video guide series on explaining switches, arrays, variables, constants, procedures and more. These are all programming concepts that can be practically used in a AOE Scenario powered by Triggers alone. If you are a programmer, you probably know these, but if not they may help you with your triggers.
Read before watching the video! I create and store a boolean statement from triggers in less then 10 minutes in the video. Also, you can download the scenario here. Register my forums for more (To see if your statement is true or false, simply check if the pavillion is or if not in the area before allowing your trigger to proceed.
Booleans > True or False Statements > Simple Switches
==========================================
AOE 2 Booleans: True/False by Bumis
[link]
Contents:
Part 1: Concept and application in structured programming.
Part 2: Method for AOE 2
Part 1:
Booleans are a programming concept found in most structured programming languages. Essentially it is just a simple on and off switch, we’ll start here and get into more dynamic variable concepts for aoe 2 in future guides.
I have two examples, one is technically an integer using 0 and 1, but it is accepted as a boolean as well, being that 0 is false and anything else is true.
Example 1:
if (status) == true) {
// Vertical line
line(Do this);
}
if (status == false) {
// Horizontal line
line(Do that);
}
Example 2:
Dim STATUS As Integer
STATUS = -1
If (Not STATUS) Then
‘ do something
Else
‘ do something else
End If
Also, even though 0 and 1’s are stored as integer’s, it’s commonly accepted that 0 is false and anything else is 1.
It is basically asking “If Status = True do this, if it’s false do this instead”.
This is exactly like a condition and an effect for triggers, but unfortunately we can’t exactly set variables for AOE 2 in a conventional method, so we’ll have to be creative here…
Part 1:
Ok, now you understand that it is a basically a switch. I have 4 ways to teach you how to do this on AOE 2. The area based method, ownership method and tribute method.
The Area Method:
The Ownership Method:
The Tribute Method:
The Object Selected Method:
Before I explain these three concepts, I want to tell you why you may want to use booleans.
Let’s take equipping a sword for example.
(Pascal Syntax Example)
if SwordEquipped=True then
begin
PlayersAttack:= “+5”
end
Now obviously in an RPG or an Action Adventure game this could be an important thing to know, even the fact that you “own” the sword is a True or False statement in most cases.
You can use these to define the default values at the start of a game/scenario/program. You could put an ingame switch to turn settings on and off or you can use it as a variable such as the sword equipped example above. Boolean True/False statements are extremely useful to know, and can be done in AOE 2 with a little imagination.
Now back to the 3 ways to accomplish this in AOE 2, which can significantly improve anyones scenario design that isn’t already aware of these methods. I would consider this a bigger/intermediate trigger concept.
…
…
Also check out my guides on inverted triggers, parts 1 2 and 3!
[link] [link] [link]————————–