Non-threaded

Forums » Advanced Editor Forum » Read Thread

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

Creating health bar for mutiple characters

11 years ago

Say you have ten different characters and you need different health bars for all of them but you don't want them to be all shown at the start of the game. You want them to be shown at the page where the characters are introduce. How do you do that? Anyone knows? 

Creating health bar for mutiple characters

11 years ago

You'd have to be more specific with what you mean, but you can show the health of character only on certain pages with scripting.

Creating health bar for mutiple characters

11 years ago

How do you do that?

Creating health bar for mutiple characters

11 years ago

If you have a variable called "HEALTH", then do this on the page you want it to appear:

%%HEALTH%%

And when the person reads your story, they'll see the number health is, rather than %%HEALTH%%.

There's other ways as well, but without you say exactly what you want, I won't bother listing them all (since they might be all you need).

Creating health bar for mutiple characters

11 years ago

Thanks. 

Also, is there a way for the number to appear elsewhere, other than in the lower left hand corner of the story with the other variables?

Creating health bar for mutiple characters

11 years ago

If you're using the "Show variable on all pages" checkbox, then no you cant change that.

Creating health bar for mutiple characters

11 years ago

If you're not, is it possible, and if so, how do you do it?

Creating health bar for mutiple characters

11 years ago

With the way I just showed you. Wherever you put %%HEALTH%% on your page is where the actual number will show up.

Creating health bar for mutiple characters

11 years ago

I see, also, when you check the box shown on all page, is there a way to organize the variables, so that health, and mana shows up at the top as oppose to being shown in alphabetical order? So that certain variables can be organized to be shown at the top, and not be in alphabetical order?

Creating health bar for mutiple characters

11 years ago

To my knowledge there's no way to do that, no.

Creating health bar for mutiple characters

11 years ago

Okay, that was pretty nice actually.

Now, is there a way to make it so that every time your strength is increase, your health increase along with it?

I just tested it, and the change was only along the lines of the first page, as the first original strength is 5, I made it time 10, so my health is 50. Then I added 25 strength, so it went up to 30 strength, but that did not make my health go up to 300.  My health stayed at 50.

Creating health bar for mutiple characters

11 years ago

Like Killa said, you can do that using %%VARNAME%% instead of checking the display on all pages box.

Creating health bar for mutiple characters

11 years ago

But then if I want health to be shown on all page, then I would have to script %%Health%% on every single pages?

Is there a shortcut?

Creating health bar for mutiple characters

11 years ago

Put in global page script:

$PAGETEXT=$PAGETEXT+"<br>%%MANA%%<br>%%Health%%"

The <br> is needed for newlines.

Creating health bar for mutiple characters

11 years ago

Thanks!

That was awesome.

Creating health bar for mutiple characters

11 years ago

Well, actually I got a error message after posting that.

Did not expect '='. Col=10

Creating health bar for mutiple characters

11 years ago

The syntax is :=

(not =)

Creating health bar for mutiple characters

11 years ago

I tried it. 

It showed up on the story game as 

%%HEALTH%%

and

%%CHAKRA%%

Creating health bar for mutiple characters

11 years ago

Also tried just putting %%Health%% itself on the global page script. It shows up error as

Did not recognize '%%'.

Creating health bar for mutiple characters

11 years ago

%%VARIABLE%% Go directly on the Pages with the text, you cannot use them in Scripts.

In Scripts, the Variable would be %VARIABLE.

Creating health bar for mutiple characters

11 years ago

I tried using %VARIABLE in the global page script.

I got error

Did not expect '(EOF)'. Col=8

Creating health bar for mutiple characters

11 years ago

Do you actually have a variable called %VARIABLE?

Creating health bar for mutiple characters

11 years ago

No, but I do have a variable called %HEALTH.

I didn't actually type %VARIABLE. 

Creating health bar for mutiple characters

11 years ago

What is error EOF?

Creating health bar for mutiple characters

11 years ago

Usually stands for End Of File. Basically means you're missing something that it's expecting.

Creating health bar for mutiple characters

11 years ago

What am I missing?

I tried typing in %HEALTH in the global page script, and the error came out like that. 

Creating health bar for mutiple characters

11 years ago

Who knows.

You'd have to copy and paste it here for us to tell.

Creating health bar for mutiple characters

11 years ago

It looks something like this.

...

I can't paste my print screen here.

I went to the script for global pages, I type in the script  "%HEALTH" and clicked validate, and the error message came up, that says 

Did not expect '(EOF)'. Col=8   

Yes, I do have a variable name HEALTH. 

Creating health bar for mutiple characters

11 years ago

You can't just type in the variable. It's not a complete script. This may work:

$PAGETEXT := $PAGETEXT+%VARIABLE