Axe Software Forums
  Quest Developer Forum
  Status Variables in 3.x


Author Topic:   Status Variables in 3.x
Naviris posted 14-01-2002 01:47 GMT     
Hi. I just switched to 3.1 from 2.whatever, and I can't get status variables to change properly. No matter what I tried, it put -5% as the result when I wanted it just to take away 5%. How do I do this without ASL script stuff?
Computer Whizz posted 14-01-2002 02:56 GMT          
Well, right now you can't subtract, add, multiply or devide with percentages - but I do think it's a worthy piece to go into the "to-do list"!

Here's one way to do it:
set a numeric with the value "%var% / 20" for which your variable, that you want 5% taken away from goes instead of "var".
Then you set up a second numeric as "%var% - %variable set up above" so you set a new variable as YOUR variable - 5%.... here's a simple example:

set numeric "percentage; %hit_value% / 20"
^^ The above gives you 5% of "hit_value"
set numeric "actual_hit_score; %hit_value% - %percentage%"
^^ That takes 5% away from the original variable and put's it into another variable.

Now, in QDK all you have to search for is "set numeric" in the variables commands, and put the name before the ";" in the text above into QDK as the variable name, all the rest (after the ";") into what the value should be!

Computer Whizz

Naviris posted 14-01-2002 06:04 GMT          
Thanks for the help, but I think that's a little beyond me for now. I need to get more familiar with the new version, but I guess it doesn't have to be a percentage for this. I'll make do.
Alex posted 14-01-2002 19:50 GMT          
quote:

I just switched to 3.1 from 2.whatever, and I can't get status variables to change properly. No matter what I tried, it put -5% as the result when I wanted it just to take away 5%. How do I do this without ASL script stuff?

If you set a status variable to "-5", it will set that status variable to the value "-5", rather than take 5 away - this was the syntax of the old "set" command for collectables. In Quest 3.x you need to specify the name of the variable too. So, where your parameter currently says:

-5

You need to change it to:

%myvar% - 5

where "myvar" is the name of your status variable.

Naviris posted 15-01-2002 08:42 GMT          
Thank you soooo much. Put things more like that in the next faq, it's missing plenty.