if (player.flying) {
player.attackbonus = player.attackbonus + 3
}
to set, re-set, alter, change, adjust an Attribute:
Object_name.Attribute_name = Value_or_Expression
example (simple Value): player.strength = 25
Addition Expresssion:
simple:
Object_name.Attribute_name = Object_name.Attribute_name + numeric_Value
example: player.strength = player.strength + 7
complex (example):
player.damage = player.weapon.damage + player.weapon.damage * player.strength / 100 - (orc.armor.resistance + orc.armor.resistance * orc.endurance / 100)
Subtraction (simple Value example):
player.strength = player.strength - 4
Multiplication (simple Value example):
player.strength = player.strength * 6
Division (simple Value example):
player.strength = player.strength / 3
------------
to do a conditional:
if (Object_name.Attribute_name OPERATOR Value_or_Expression) {
Object_name.Attribute_name = Value_or_Expression
}
OPERATORS:
addition: +
subtration: -
multiplication: *
division: /
modulus: %
greater than: >
lesser than: <
greater than or equal to: >=
lesser than or equal to: <=
equals: =
not equals 1: <>
not equals 2: not xxx = xxx
comparison: =
concatenating: +
---------
the parenthesis are for a condition of a Script~Function~command, example: if (xxx)
the scripting block of a Function~Method is the squiggle brackets, an example: if (xxx) { scripting }