Hi stants,
I didn't have as much time as I thought to post up an example yesterday so will attempt to do it today...
The following flag coding conditions and actions will be useful in recording and controlling a kind of "combat" system...
FLAG CONDITIONS
================
flagX [ >= | <= | <> | > | < | = ] Y
Example: "flag16<17"
equalX,Y - Are the values held by flags X and Y equal?
notequalX,Y
greaterorequalX,Y
lessorequalX,Y
lessX,Y
greaterX,Y - Is value of flag X greater than that of flag Y?
FLAG ACTIONS
============
flagX=Y - set flag X to contain a value Y
decflagX,Y - decrease flag X by numerical value of Y
incflagX,Y - increase flag X by numerical value of Y
randomizeflagX,Y - place a random value from 1 to Y into flag X.
addX,Y - contents of flag X added to flag Y
subX,Y - contents of flag X subtracted from flag Y
copyflagX,Y - contents of flag X replaces contents of flag Y
swapflagsX,Y - the values held by flags X and Y are swapped
Code embedding 'tag':
%flagX% - prints numerical value of flag X eg:
#cmessThe value of flag 15 is %flag15%.#
Now stants, what are your thoughts on how the combat is to be initiated?
You could use a spare flag to act as a sort of dice throw using "randomizeflagX,Y" eg: randomize100,2
If flag100 was equal to 1 then player loses say 3 hit-points from his flag but if flag100 was 2 then the character would suffer 3 hit-points damage...
You could slow down the combat output messages using the "pauseX" action for a kind of real-time "effect"...
Phil.