Non-threaded

Forums » Advanced Editor Forum » Read Thread

Get help from the experts on variables, scripts, items, and other scary things.

Top five coolest uses for variables IMO.

18 years ago

5th. Weaponskill, Strength, Speed, etc.
      Using variables to determine the strengths and weaknesses of a character, including but not limited to their abilities to use items.

4th. Random variables for gambling and or hunting, etc.
      As seen in Cryptode or The Tower, the ability to hunt and or gamble is fun for the user and even more fun to put into play by the author.

3rd. Switches
     Using a variable with min/max's of 0 and 1.  Its exactly like a switch ie:

If FOUND JEWELRY = 1 (more then 0 works too) then display link: GIVE JEWELRY
If FOUND JEWELRY = 0 (less then 1 works too) then display link: Say: THATS NICE

Hidden text (difficulties, etc.)
      http://myadventuregame.com/forums/message.aspx?MessageId=1879. Also can be used for numeral different circumstancs.

Teleportation from any page to any other page (including from one chapter to another)
     Kind of a difficult concept.  I'l try my best to explain.  Lets say there is a chapter titled HOUSE.  It can be acessed from many different areas in the game, but not all of them are at the start of a chapter.  what to do. Heres what you do.  Add a link to the chapter, and reset a variable called CHAPTER to 1.  Then on teh first page of that chater have hidden text (what would normally be there for the beggining of that chapter and have it %%CHAPTER%=%0%sdffgsgsdgsdfgsdgf%. Then have %%CHAPTER%=%1%Yuo step out of the house and decide where to go.%

Links

RES: CHAPTER = 0: sdhgsjkdfgkjlsdfgjk
RES: Chapter = 1: Contineu on ur journey (lead s to page after entrance to house in teh story)

Top five coolest uses for variables IMO.

18 years ago
      I used something like the jewelry one on Weirdos from another Planet 2. It is pretty cool.

Top five coolest uses for variables IMO.

18 years ago
That's actually a very common use of variables in every game with variables.  Many RPGs have it and so do many Flash.  Example:

If Weapon A is bought, than Weapon A cannot be bought again.

Top five coolest uses for variables IMO.

18 years ago

Precisely.

Top five coolest uses for variables IMO.

18 years ago
That teleportation would be very useful to me, but it doesn't quite work.

If I put %%VARIABLE%=%0%Blahaahahahah%   

and

%%VARIABLE%=%1%Blahahaahah%

While it will show only that text, the variable name with one percentage still appears. It looks like

VARIABLE%=%1% Then the text. Once changed, it doesn't show the VARIABLE=0 info, but before that page, it DOES show the VARIABLE=1. You sure the percentages are all in the right place??

Top five coolest uses for variables IMO.

18 years ago
Figured it out. Actually, triple J, you were wrong with that syntax. You probably typo'd it. For those who care, there needs to be ONE MORE % at the end.

Such as:

%%VARIABLE%=%0%Blaahahahaha%%

Top five coolest uses for variables IMO.

18 years ago
Oh, and another thing I figured out: If you want to prevent weird spacing with the two separate pages, do the following.

Make sure the variables are RIGHT next to each other. It would look like this:

%%VARIABLE%=%0%Blahahah%%%%VARIABLE%=%1%Blahahaahahah%%

Apparently, they variable adds a space, much like a span/div tage, so keeping them right next to each other makes the pages look exactly the same, without any extra <br> or <p> looking spaces!

Top five coolest uses for variables IMO.

18 years ago

That hidden text is a great feature! I didn't know it could be done.

Top five coolest uses for variables IMO.

18 years ago
I ROCK, lol kidding.