Kumquat, The Grandmaster of the Written Word

Member Since

10/14/2008

Last Activity

2/13/2017 8:05 AM

EXP Points

5,340

Post Count

4

Storygame Count

0

Duel Stats

0 wins / 0 losses

Order

Architect

Commendations

0

It feels so strange not having to click that link every day...

Trophies Earned

Earning 100 Points Earning 500 Points Earning 1,000 Points Earning 2,000 Points Earning 5,000 Points

Storygames

Word Recall Demonstration
unpublished

This is a demonstration of the scripts I have written to store and display a word entered by the reader.

Please note that there is a better way to do this. I will update this example as soon as I can.


Recent Posts

Set variables to letters. on 2/4/2009 1:16:49 PM

%LETTER1:="D" sets %LETTER1 to 0. If you meant to type 4 instead of "D" then our scripts are the same (except mine has shorter names and no spaces). 

http://www.myadventuregame.com/story/Word_Recall_Demonstration.aspx 
This is a demonstration of how saving and recalling words must be done now. Again, would it be feasible to change the editor to allow variables to be set to letters (and perhaps symbols)?

 


Set variables to letters. on 2/3/2009 2:32:57 PM

I already have it saved on a WordPad document and on two pages in my storygame. The problem is that it is 9,270 characters long and I would rather use something that is 2 characters long.


Set variables to letters. on 2/3/2009 12:23:54 PM

Or: Less restrictive variables.
Would it be possible to allow variables to be set to letters? I want to save and display a word that is entered by the reader, but my current method requires a very long line of code to be used every time the word is to be displayed. Allowing variables to be set to letters would allow me to use the code once and the variable every time after that. For example:

[Very long line of code that sets $LINKTEXT31 to the word.]
%N:=$LINKTEXT31

Link #31 would not be visible, of course. Alternatively:

%N:="N"
%N:=%N+"a"
%N:=%N+"m"
%N:=%N+"e"

If that would set %N to "Name" then I would be able to skip using a link and the code would be significantly shorter.

Are either of these feasible, or will I be stuck using a very long line of code every time I want the word to be displayed?


Cold Blood on 1/21/2009 4:05:30 PM

Your code will not work, solostrike. It will add the difference between the limit and the amount you would have without the limit to the ammunition, which allows it to go over the limit. It will also decrease the amount of ammunition you have if you already have a low enough amount.

IF %TOTALAMMO + %NEWAMMO > 200 THEN BEGIN
 %WASTEAMMO:= %TOTALAMMO + %NEWAMMO - 200
 %NEWAMMO:= %NEWAMMO - %WASTEAMMO
END
%TOTALAMMO:= %TOTALAMMO + %NEWAMMO
IF %AMMOTYPE=1 THEN %AMMO1:= %AMMO1 + %NEWAMMO
IF %AMMOTYPE=2 THEN %AMMO2:= %AMMO2 + %NEWAMMO
IF %AMMOTYPE=3 THEN %AMMO3:= %AMMO3 + %NEWAMMO

This should work. %TOTALAMMO is the total amount of ammunition you have. %NEWAMMO is the amount of ammunition that was found. %WASTEAMMO is the amount you cannot carry. %AMMOTYPE is the type of ammunition that was found. %AMMO1, %AMMO2, and %AMMO3 are the amounts of ammunition each weapon has.

Please forgive me if I have made a mistake.