Non-threaded

Forums » Advanced Editor Forum » Read Thread

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

Variable ideas

18 years ago
1. The editor should allow you to increase one variable, then once that variable has reached a designated point, the next variable should be increased (or decreased). For example, if you have enemy #1's HP go to 0, then enemy #2's HP start decreasing.

2. The editor should allow you to have multiple destinations after getting a certain amount of a variable (the amount can be changed with the different destination).

3. The editor should allow variables to take you to certain links every amount of a variable. For example, every 100 points, you gain a life or something.

Just some ideas.

Variable ideas

18 years ago

#1 may be accomplished using Scripting, possibly:

IF %ENMYHPS1 > 0 THEN %ENMYHPS1 := %ENMYHPS1 - %ATCK
ELSE IF %ENMYHPS2 > 0 THEN %ENMYHPS2 := %ENMYHPS2 - %ATCK
ELSE IF %ENMYHPS3 > 0 THEN %ENMYHPS3 := %ENMYHPS3 - %ATCK
ELSE $DEST := @P95

#2 don't understand.

#3 Another scripting thing:

#global page script, gives player a new life every 100 points
IF %POINTS / 100  > %LASTLVL THEN
  BEGIN
    %LASTLVL := %LASTLVL + 1
    %LIVES := %LIVES + 1
  END

Variable ideas

18 years ago

Hi, my name is Danny.

I figured out how to do #2, or at least what I think you mean by #2.

I am using the Advanced Editor.  (This is probably easily done with scripts, but as I have not yet published even a single game, I decided to slowly learn my way through the Basic and Advanced Editors first, as a more of a writer than a programmer.)

Ok, I have two locations, "Edge of Forest.," and another location "Forest Clearing."

When you are in "Edge of Forest" and you click on the link for "Forest Clearing", the game rolls 1D6.

Once you are in Forest Clearing, I have 6 hidden links: "No event," Old Man," "Treasure," "Monster," etc...

Each link has a variable restriction on it so that for it to be visible, RANDOM1 must equal what it is... 1, 2, 3, 4..etc... and you don't see the link unless you get the roll.  So, for example, you only see "Old Man" if you roll a 2. 

After each encounter, you get a link to "Heading back to the Clearing" which has some gorgeous purple prose on it, and which more importantly resets RANDOM1 to zero.  Then at "Heading..." you get the link for "Forest Clearing" again, which again rolls 1D6, allowing for multiple destinations using a single variable. 

-- Danny

.PS I admit this would probably be much easier with scripting, but it works and that's the important thing.

 

Variable ideas

18 years ago
Yeah pretty much. But this is going from one link to another with the same variable.
I really don't see how you don't understand alexp. It's pretty simple. Here's an example:

You get to one link by getting 15 points of a variable, then a different link by getting 18 of the same variable.

Variable ideas

18 years ago

That's what I illustrated.  Though maybe not so well.  In a pseudo-script form, what I am doing is something like this:

RANDOM1 = 1D3

If RANDOM1 = 1 then go to page "No event"

If RANDOM1= 2 then go to page "Old man"

If RANDOM1= 3 then go to page "Treasure"

Reset RANDOM1

* * *

Depending on what the variable RANDOM1 is will determine to what link you go to...

 

 

 

Variable ideas

18 years ago

#2

Put this in the link you want to have multiple pages:

IF %VAR1 < 5
$DEST = 1
#I'm not sure if that's the correct way to do that part.  Check the article.
ELSE
IF %VAR1 > 5
$DEST = 2
ELSE

I'm not sure if the following is aloud though:

IF %VAR1 > 5 AND < 10
ELSE

Or the following:

IF $DEST = 1,3,7,9
ELSE