This shows you the differences between two versions of the page.
Both sides previous revisionPrevious revisionNext revision | Previous revisionNext revisionBoth sides next revision | ||
script_syntax [2020/07/21 16:22] – justin | script_syntax [2020/08/05 21:36] – justin | ||
---|---|---|---|
Line 2: | Line 2: | ||
---- | ---- | ||
- | The scripting language | + | Bauxite, the scripting language |
=====Statement Syntax===== | =====Statement Syntax===== | ||
Line 32: | Line 32: | ||
**Examples: | **Examples: | ||
<code bauxite> | <code bauxite> | ||
- | rand_num = random(1, 20) | + | $rand_num = random(1, 20) |
</ | </ | ||
<code bauxite> | <code bauxite> | ||
Line 63: | Line 63: | ||
</ | </ | ||
<code bauxite> | <code bauxite> | ||
- | rand_num = random(1, 20); | + | $rand_num = random(1, 20); |
- | if rand_num > 15 then | + | if $rand_num > 15 then |
| | ||
- | elseif rand_num > 10 then | + | elseif |
| | ||
else | else | ||
Line 92: | Line 92: | ||
<code bauxite> | <code bauxite> | ||
display_message(" | display_message(" | ||
- | for slime_entity in group[" | + | for $slime_entity in group[" |
- | | + | |
end | end | ||
</ | </ | ||
Deals 5 damage to each [[entity]] in the " | Deals 5 damage to each [[entity]] in the " | ||
<code bauxite> | <code bauxite> | ||
- | for i in range(1, 4) do | + | for $i in range(1, 4) do |
- | | + | |
end | end | ||
</ | </ | ||
Line 130: | Line 130: | ||
**Examples: | **Examples: | ||
<code bauxite> | <code bauxite> | ||
- | for slime_entity in group[" | + | for $slime_entity in group[" |
- | | + | |
end | end | ||
</ | </ | ||
Line 142: | Line 142: | ||
Displays the message if the player model' | Displays the message if the player model' | ||
<code bauxite> | <code bauxite> | ||
- | dungeon_map_list = array[" | + | $dungeon_map_list = array[" |
- | load_map(dungeon_map_list[random(0, | + | load_map($dungeon_map_list[random(0, |
- | item_list = array[" | + | $item_list = array[" |
- | give_item(item_list[random(0, | + | give_item($item_list[random(0, |
</ | </ | ||
Loads a random map from the " | Loads a random map from the " | ||
Line 165: | Line 165: | ||
<code bauxite> | <code bauxite> | ||
set_player_movement_locked(true); | set_player_movement_locked(true); | ||
- | target_tile = tile[7, 8, 0]; | + | $target_tile = tile[7, 8, 0]; |
- | if target_tile == null then | + | if $target_tile == null then |
| | ||
else | else | ||
- | | + | |
end | end | ||
</ | </ |