hopefully, this will be of some help
--------------------------
The Two Super Scripts (you can do ~ 90% of everything~anything that you want with just these two scripts used together):
In the GUI~Editor: run as script -> add a script -> Scripts -> If...~AND~
In the GUI~Editor: run as script -> add a script -> variables -> set a variable or attribute-------------------------
Variable (are not attached to objects, which means they can only be used for that single script block that it is used within):
Variable = Value_or_Expression
example of using a Value:
you_go_first = false
color = black
x = 3
example of using an Expression:
x = (x + 1) / 2
primary_pigment_colors = split ("blue;yellow;red",";")
--------------------------------
Attribute (are attached to objects, which means you can use them anywhere, so long as the Object still exists of course):
Object.Attribute = Value_or_Expression
example of using a Value:
HK.strength = 100
HK.dead = false
HK.favorite_color = black
example of using an Expression:
HK.damage = weapon.damage + weapon.damage * (HK.strength - orc.endurance) / 100
and it's 'tagging' too:
(in the GUI~Editor: "whatever" Object -> Attributes Tab -> Attributes -> Add)
<object name="HK">
<inherit name="editor_object" />
<inherit name="editor_player" />
<attr name="strength" type="int">100</attr>
<attr name="damage" type="int">0</attr>
<attr name="dead" type="boolean">false</attr>
<attr name="favorite_color" type="string">black</attr>
<attr name="attack" type="script">
HK.damage = weapon.damage + weapon.damage * (HK.strength - orc.endurance) / 100
</attr>
</object>
---------------------------
Addition:
Object.Attribute = Object.Attribute + your_number_amount
example: HK.strength = HK.strength + 100
Subtraction:
Object.Attribute = Object.Attribute - your_number_amount
example: HK.strength = HK.strength - 100
Multiplication:
Object.Attribute = Object.Attribute * your_number_amount
example: HK.strength = HK.strength * 100
Division:
Object.Attribute = Object.Attribute / your_number_amount
example: HK.strength = HK.strength / 100
----------------------
conceptual example:
Old: HK.strength = 25
HK.strength = HK.strength + Value
HK.strength (new) = HK.strength (old) + 50 (Value)
HK.strength (new) = 25 (old) + 50 (Value)
HK.strength (new) = 75 (Value)
New: HK.strength = 75