Main character.

For help with creating games using Quest

Moderators: Pertex, Cryophile, Alex, sgreig

Main character.

Postby fritiof » Sun Jul 10, 2011 4:54 pm

Hi, 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.
fritiof
 
Posts: 24
Joined: Sat Jul 09, 2011 1:28 am

Re: Main character.

Postby Alex » Sun Jul 10, 2011 5:34 pm

Take a look at Status Variables - this is exactly what they're designed for.
User avatar
Alex
Site Admin
 
Posts: 2106
Joined: Fri Jun 27, 2003 11:06 pm
Location: London, UK

Re: Main character.

Postby fritiof » Sun Jul 10, 2011 8:58 pm

I 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?
fritiof
 
Posts: 24
Joined: Sat Jul 09, 2011 1:28 am

Re: Main character.

Postby RedTulip » Mon Jul 11, 2011 12:35 am

Status 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.
User avatar
RedTulip
 
Posts: 75
Joined: Sun Mar 20, 2011 11:03 am

Re: Main character.

Postby fritiof » Mon Jul 11, 2011 12:46 pm

I'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.
fritiof
 
Posts: 24
Joined: Sat Jul 09, 2011 1:28 am

Re: Main character.

Postby Alex » Mon Jul 11, 2011 1:25 pm

Variables category, "decrement a numeric variable"
User avatar
Alex
Site Admin
 
Posts: 2106
Joined: Fri Jun 27, 2003 11:06 pm
Location: London, UK

Re: Main character.

Postby Pertex » Mon Jul 11, 2011 2:24 pm

here is an example
Attachments
test.asl
(628 Bytes) Downloaded 63 times
User avatar
Pertex
 
Posts: 1129
Joined: Fri Jul 09, 2010 9:52 am
Location: germany

Re: Main character.

Postby fritiof » Mon Jul 11, 2011 3:57 pm

WHAT 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...
Attachments
Second quest adventure.asl
(9.67 KiB) Downloaded 55 times
fritiof
 
Posts: 24
Joined: Sat Jul 09, 2011 1:28 am

Re: Main character.

Postby Alex » Mon Jul 11, 2011 5:07 pm

Your "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: !"
User avatar
Alex
Site Admin
 
Posts: 2106
Joined: Fri Jun 27, 2003 11:06 pm
Location: London, UK

Re: Main character.

Postby fritiof » Mon Jul 11, 2011 5:23 pm

Well sir I don't wanna be an a**hole 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
fritiof
 
Posts: 24
Joined: Sat Jul 09, 2011 1:28 am

Re: Main character.

Postby Alex » Mon Jul 11, 2011 5:40 pm

health.png
health.png (91.38 KiB) Viewed 2544 times
User avatar
Alex
Site Admin
 
Posts: 2106
Joined: Fri Jun 27, 2003 11:06 pm
Location: London, UK

Re: Main character.

Postby fritiof » Mon Jul 11, 2011 6:53 pm

Thanks 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.
fritiof
 
Posts: 24
Joined: Sat Jul 09, 2011 1:28 am

Re: Main character.

Postby Alex » Mon Jul 11, 2011 6:56 pm

I 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: !"
User avatar
Alex
Site Admin
 
Posts: 2106
Joined: Fri Jun 27, 2003 11:06 pm
Location: London, UK

Re: Main character.

Postby fritiof » Mon Jul 11, 2011 9:21 pm

I 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 :(
fritiof
 
Posts: 24
Joined: Sat Jul 09, 2011 1:28 am

Re: Main character.

Postby Pertex » Tue Jul 12, 2011 7:30 am

Oh yes, I would call this rude.

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?
User avatar
Pertex
 
Posts: 1129
Joined: Fri Jul 09, 2010 9:52 am
Location: germany


Return to Quest Forum

Who is online

Users browsing this forum: No registered users and 1 guest