Alongside working on the Scifi Kit and getting the core NPC / AI systems in place I am now adding the ability to set CREATE, SET, FETCH, ADD TO, SUBTRACT FROM, TIMES BY, DIVIDE BY and most importantly COMPARE against.
As variables are deemed more advanced commands, the command entry gets a little more complex. (I will implement verbose versions of these commands once they are fully implemented, tested and working)...
Let's look at how you will use these new powerful commands, when ready.
----------------------------------------------------------------------------------
Variables can be of three types. They are by default global.
private. only held and accessible on YOUR machine.
local. only held and accessible at a certain location (across multiplayer)
global. accessible anywhere (across multiplayer)
SET VARIABLE
#health=100
SET VARIABLE
#health=100
ADD TO VARIABLE (NUMBERS)
#health=health+1
ADD TO VARIABLE (TEXT)
#glyph=fire
#rune=ball
#spell=glyph+rune
SUBTRACT FROM (NUMBER / VARIABLE)
#health=health-1
MULTIPLY BY (NUMBER / VARIABLE)
#xp=0
#level=10
#xpearned=5
#xp=xpearned*level
DIVIDE BY (NUMBER / VARIABLE)
#health=100
#health=health/2
IF / ELSE
?health<=0:gameover=y!gameover=n
The above code checks if the players health is less than or equal (<=) to 0 and then (:) game is over ELSE (!) not game over
You can also run scripts / run script commands in the IF / ELSE i.e.?health<=100:health=health+1!health=100
All of the above commands can be used in scripting commands and in .verbose script files.
As these ifs allow a singular event IF TRUE / FALSE you could also combine with a custom command.
if gameover then do this and do that
OR for even more power, SET or use VARIABLE / IF ELSE inside custom commands.
---------------
EXAMPLE
--------------------
An example of how they might be used..
In the bunker demo there is a gate. We want to allow the player to scale the gate if they have a high acrobatics level.
#acrobatics=0
if climb gate then ?acrobatics=10:climbovergate!narrate You cant climb it
if climbovergate then force n and narrate You scale the gate
To be able to climb the gate the acrobats variable would need to match 10, otherwise they will fail. You could increase their acrobatics level when they complete training for example.
if learnacrobats then #acrobats+1
Lets say they learn it by reading books on acrobatics.
if acrobaticsweekly.read then #acrobatics+1
force *direction* is a new set of commands which will also be added in the next update allowing you to move the player regardless of locked doors etc (where needed) great for letting the player find other ways to exit etc. i.e. force s
------------------------------------------------
Variables should be coming in the next update.
~ Liam
