Can you hide a variable?

For help with creating games using Quest

Moderators: Pertex, Alex, sgreig, Cryophile, jaynabonne

Hulkman508
Posts: 15
Joined: Thu Aug 11, 2011 4:57 am
Location: Nz

Can you hide a variable?

Postby Hulkman508 » Mon Aug 29, 2011 8:00 am

What I'm trying to do is have an inventory limit. Whenever you pick up an item it increases the numeric variable "inventory" by 1, and when you drop/lose it decreases by 1. What I dont want however is the variable inventory actually showing, because I feel it shouldn't be there and I already have quite a few variables in my game (health, mana, skills etc) so I am trying to reduce, variable clutter.

If this isn't possible are there any other suggestions at how I could go about this? Thanks :)

User avatar
Alex
Site Admin
Posts: 2109
Joined: Fri Jun 27, 2003 11:06 pm
Location: London, UK
Contact:

Re: Can you hide a variable?

Postby Alex » Tue Aug 30, 2011 7:28 am

Just use a normal variable - it doesn't have to be a status variable, so just remove it from the status variables list.

It will still work normally, it just won't be displayed any more.

It might be a good idea to ensure that you set it to an initial value in your game start script though (use the "set a numeric variable" script command).

Hulkman508
Posts: 15
Joined: Thu Aug 11, 2011 4:57 am
Location: Nz

Re: Can you hide a variable?

Postby Hulkman508 » Wed Aug 31, 2011 8:35 am

Thanks for relpying. I was under the impression that all variables had to be status variables. This will tidy up my game in terms of variables.


Return to “Quest Forum”

Who is online

Users browsing this forum: No registered users and 1 guest