Adventure Game Studio

AGS Support => Advanced Technical Forum => Topic started by: Scorpiorus on Wed 14/05/2003 20:07:23

Title: Suggestion: GetGameOption()
Post by: Scorpiorus on Wed 14/05/2003 20:07:23
Sorry for bothering you CJ, but when I was looking for such a function like GetGameOption() I could'n find one. What I really need is to know whether the anti-glide mode is turned on, then execute depending on the result. Is there a chance you'll implement one? :P

-Cheers
Title: Re:Suggestion: GetGameOption()
Post by: Pumaman on Wed 14/05/2003 23:22:32
Okey, I don't see why not.

A workaround is of course to record in a GlobalInt whenever you change the Anti-Glide Mode setting, and work it out from that.
Title: Re:Suggestion: GetGameOption()
Post by: Scorpiorus on Thu 15/05/2003 11:01:35
QuoteOkey, I don't see why not.
Thanks, Cj.

QuoteA workaround is of course to record in a GlobalInt whenever you change the Anti-Glide Mode setting, and work it out from that.
Yep, that is how it works for now. I have function get called on game start event which overrides anti-glide setting. Thereby I know it's state. But I just want to know it's initial state (in the editor). What I do is a movecharacter() function but it should work differently depending on anti-glide mode setting (whether it would work relying on character[].animspeed value when updating the char's position or not etc.)

thanks again

-Cheers
Title: Re:Suggestion: GetGameOption()
Post by: Pumaman on Sat 17/05/2003 16:45:05
Actually, thinking about it I don't know if this is necessary. You can workaround it like this:

int old_value = SetGameOption (OPT_ANTIGLIDE, 1);
SetGameOption (OPT_ANTIGLIDE, old_value);


obviously it's a bit messy, so yeah a GetGameOption function would be handy, but it is possible to do this way.
Title: Re:Suggestion: GetGameOption()
Post by: Scorpiorus on Sat 17/05/2003 17:53:24
Oh, sorry CJ I just have figured out it returns "...the old value of the setting." I need to read the manual more attentively next time. hehe ;D

-Cheers