this is mostly done in code (much faster~easier~quicker for me), but~so, just ask if you need help with how to do this stuff in the GUI~Editor (all the friendly windows and buttons, drop down choices, and etc stuff), as code<->GUI~Editor isn't very intuitive (argh, it's a pain trying to match up code with GUI~Editor, or vice-versa, laughs).
------------
the two super scripts (especially when used together, they can do 90% of everything that you want to do in your game):
the code + 'if' mindset mentality, which takes awhile to train your brain to think in this way, lol:
1. the 'if' script; in code: if (Object_name.Attribute_name = Value_or_Expression) { script1 ] else if (Object_name.Attribute_name = Value_or_Expression) { script2 } else { script3 }
2. the 'set a variable or attribute' script; in code: Object_name.Attribute_name = Value_or_Expression
Object_name.Attribute_name = Value_or_Expression
examples (using my own labeling system):
as Values:
HK.strength_integer = 100
player.affection_integer = 100
player.affection_string = "irresistable"
player.head_object = tiara
player.gender_string = "female"
player.favorite_animal_string = "cat"
orc.dead_boolean = false
player.damage_double = 72.904
as Expressions:
player.favorite_cat_colors_stringlist = split ("black;white", ";")
HK.damage_integer = HK.weapon_damage_integer + HK.weapon_damage_integer * HK.strength_integer / 100 - orc.armor_class_integer - orc.armor_class_integer * orc.endurance_integer / 100
--------------
(see above for an example of a complex expression: HK.damage_integer = ...blah...)
Basic Math Computation Expressions, examples:
Addition:
player.strength_integer = player.strength_integer + 10
Subtraction:
player.strength_integer = player.strength_integer - 8
Multiplication:
player.strength_integer = player.strength_integer * 3
Division:
player.strength_integer = player.strength_integer / 2
---------------
conceptually (algebraic substitution), using addition:
initial~old: player.strength = 0
player.strength (new) = player.strength (old: 0) + 5
player.strength (new) = 0 + 5
player.strength (new) = 5
new: player.strength = 5
old: player.strength = 5
player.strength (new) = player.strength (old: 5) + 5
player.strength (new) = 5 + 5
player.strength (new) = 10
new: player.strength = 10
old: player.strength = 10
etc etc etc
-------------------
example of buying something:
if (player.cash_integer >= shoe.price_integer) {
player.cash_integer = player.cash_integer - shoe.price_integer
shoe_store.cash_integer = shoe_store.cash_integer + shoe.price_integer
shoe.parent = player
msg ("You bought the shoe for " + shoe.price_integer + ", leaving you with only " + player.cash_integer + " cash left.")
} else if (player.cash_integer < shoe.price_integer) {
msg ("Sorry, but you don't have enough to buy the shoe.")
}
----------------------------
'if' script + 'set a variable or attribute' script:
Conceptually:
if (attribute = X), then do script 1
else if (attribute = Y), then do script 2
examples (in code):
if (player.gender_string = "male") {
player.intelligence_string = "stupid"
player.attractiveness_string = "ugly"
} else if (player.gender_string = "female") {
player.intelligence_string = "smart"
player.attractiveness_string = "beautiful"
}
if (orc.dead_boolean = true) {
msg ("The orc is already dead, silly.")
} else if (orc.dead_boolean = false) {
orc.dead_boolean = true
msg ("You kill the orc.")
}