Main character.
fritiof
10 Jul 2011, 16:54Hi, it's me again, I am wondering how you for example add settings to your main character. In this example I open a storage with poisons, the gases come out of the storage and makes my character lose 5 hit points. Now how do I do that, like make my character lose 5 of something called "health" and when i lose 100 in total I die.
Alex
10 Jul 2011, 17:34Take a look at Status Variables - this is exactly what they're designed for.
fritiof
10 Jul 2011, 20:58I can't say I understand this, i can display health 100 to the right on my character screen in the game but how do i make the value drop? if i for example lose health by someone attacking me how do i make the value on the game screen drop, and how do I make you lose if it goes zero?
RedTulip
11 Jul 2011, 00:35Status variables are really variables, but they are on the screen, so when someone attacks the player, you decrease the health status variable by just choosing the script to lower down the variable's number, and just typing the health variable's name as the variable and as the number to decrease, whatever you want. Simply, status variables are like normal variables, and you can still use the same variable scripts on the status variables you use on 'normal' variables.
fritiof
11 Jul 2011, 12:46I'm sorry but I really don't understand, let's say I go into a room called "bathroom" there some crazy dude attacks me with a knife and I lose 20 hit points out of 100 before I'm able to close the door. SO do I choose "run a script" when the players opens the door? Well I have tried running a script but I can't find anything in there to change a status variable.
Alex
11 Jul 2011, 13:25Variables category, "decrement a numeric variable"

Pertex
11 Jul 2011, 14:24here is an example
fritiof
11 Jul 2011, 15:57WHAT DID i DO WRONG NOW!? I see the stuff you mentioned. In this example I open a kitchen storage and there are loads of poisons inside and when the gases come out I am supposed to lose health. But what happens is it says "you lose health" I told the game that it's supposed to say this whenever my status variable "health" decreases, but it doesn't show it decreased on the screen! It just says "health:100" as if nothing happened. Just check what I did wrong, please...
Alex
11 Jul 2011, 17:07Your "Display" text is "Health:100", which will never change - it will always say 100 no matter what the actual health value is.
The help text under the Display box provides some guidance here - it says you need to use the "!" character where you want the value of the variable to appear. So your display text should be something like this: "Health: !"
The help text under the Display box provides some guidance here - it says you need to use the "!" character where you want the value of the variable to appear. So your display text should be something like this: "Health: !"
fritiof
11 Jul 2011, 17:23Well sir I don't wanna be an asshole but i don't understand. This is what I wanna do: make the "health"box to the right of the screen in the game change when I lose health, so let's say I want it to change to "95" when I lose health from opening the poison storage. I also want to lose the game when the value drops to 0. Explain to me in steps how to do that, cause they don't explain status variables in the tutorial
Alex
11 Jul 2011, 17:40
fritiof
11 Jul 2011, 18:53Thanks for answering one of my two questions. You seem to have forgotten the other question though, how do I MAKE IT SO THE STATUS VARIABLE "HEALTH" TO THE RIGHT OF THE SCREEN DROPS WHEN SOMETHING HAPPENS. PLEASE ANSWER THAT QUESTION AND NO OTHER.
Alex
11 Jul 2011, 18:56I shall ignore your rudeness for now, and point you to the two previous answers in this thread which answer your one and only question:
- use the "Decrement a numeric variable" script command
- make sure your health display string says "Health: !"
- use the "Decrement a numeric variable" script command
- make sure your health display string says "Health: !"
fritiof
11 Jul 2011, 21:21I was not being rude at all :/
P.s Thanks for answering my question, what you said worked, though you accused me of being rude which I had no intent to be
P.s Thanks for answering my question, what you said worked, though you accused me of being rude which I had no intent to be


Pertex
12 Jul 2011, 07:30Oh yes, I would call this rude.
What about chapter 17 of the tutorial?
fritiof wrote: Explain to me in steps how to do that, cause they don't explain status variables in the tutorial
What about chapter 17 of the tutorial?