Disabling GUI 1 causes funky anim problem

Started by pslim, Sat 15/04/2006 09:16:58

Previous topic - Next topic

pslim

Hey, guys.

I searched the beginner's technical forum for a problem similar to mine and didn't find one, so I'm going to go ahead and post the question.

I'm working on a cutscene and I need to disable GUI 1, my persisent icon bar. First I tried using the pull-down menu in the interactions section, where I also disabled GUI 0, my status line, in Player-enters room (before fadein).

I also have an 8-frame object repeatedly animating as a background (scrolling stars... this might not be the best way to do it, but it was the first thing that came to me). Anyway, the animation worked fine with the GUIs enabled, and it worked fine with GUI 0 disabled, but when I disabled GUI 1, I got just a black screen with a few seemingly random sprites (some of which don't appear on any view of any object or character) cycling at the lower left corner of the screen.

I thought this might be some sort of version to version glitch so I took out the pull-down version of hide GUI and added a run script event in before fadein. I used

gIconbar.Visible = false;

which compiled with no problem, and then created the same issue as before when I went to test my game.

Is GUI 1 a special GUI I'm not supposed to mess with? Its visible status is normal, and the manual says that GUI.Visible will work with GUIs of that status, so I'm stumped.

Any help would be appreciated. :)
 

Saberteeth

As much as i don't like posting in this forum, I think the problem is in the before fadein. Try after fadein instead because sometimes(like Display()) can give you a black screen. Also, did you put the stars animation into the before fadein also?

pslim

Quote from: Saberteeth on Sun 16/04/2006 07:34:59
As much as i don't like posting in this forum, I think the problem is in the before fadein. Try after fadein instead because sometimes(like Display()) can give you a black screen. Also, did you put the stars animation into the before fadein also?

Putting the hide GUI 1 command in after fadein worked!

I set the object views in before fadein and animated them in after fadein. I also was trying to hide the GUIs in before fadein, and hiding the status bar (GUI 0) worked fine but the icon bar (GUI 1) caused problems.

But anyway, thanks for the suggestion. :)
 

Scorpiorus

#3
Quote from: pslim on Sat 15/04/2006 09:16:58Is GUI 1 a special GUI I'm not supposed to mess with? Its visible status is normal, and the manual says that GUI.Visible will work with GUIs of that status, so I'm stumped.

By default, gIconbar's visible status in the editor is set to Mouse YPos (not Normal). I haven't tested it but it may be possible that "gIconbar.Visible = false;" won't work properly in that case (in before fade-in or whatever).

EDIT:

I've just re-read the original post; so you have set its visible property to Persistent? Hmm, I'd guess it may be the case with that option (possibly because it's not turned off when interface is disabled etc.)

EDIT:

I gave it a go and tested it with all possible Visible variants (Normal, Mouse YPos, Popup Modal, Persistent) and it worked fine in either case.

What version of AGS are you using?

What colour mode do you use (paletted 8bit, high colour 16bit or true colour 32bit) ?

pslim

#4
Hey, Scorpiorus...

Thanks for looking into it. I'm using version 2.71, 16-bit color.

Yeah, I changed the default Mouse YPos to Normal so that my gIconbar would remain visible at all times during normal play.

What I found strange about all this was that when I used "gStatusline.Visible = false;" in the before fade in section, everything worked fine (statusline is GUI 0 for me). Then when I did the same thing for gIconbar (GUI 1), I got the strange problem.

When I hid GUI 1 during the after fadein section, the problem disappeared. Doesn't seem to make a difference where I hide GUI 0, but GUI 1 seems to want to be hidden after fadein rather than before. I'm curious as to why, in case there's some principle involved that I'll want to apply elsewhere concerning GUIs or just GUI 1 or whatever.


EDIT: I just realized "persisent" is an actual GUI option. I called it "persisent" to differentiate it from a popup GUI not realizing that "persistent" in this case indicated something specific beyond its being set to normal. So, to clarify, GUI 1 is now and has this whole time been set as "normal" in the GUI controls.  :)
 

Scorpiorus

Yeah, it's rather odd that gIconbar acts like that. It should be perfectly possible to turn a GUI on/off in the "before fade-in" event, so you may normally rely on it to work.

I'm not sure, maybe the problem is indeed an iconbar specific one (since it usually has a button to display an active inventory item, etc...). And/or there is an issue with a cutscene running.

Out of curiosity, have you modified gIconbar in any way except for changing its Visible state (that is: adding/removing buttons, changing GUI/buttons properties, etc...) ?

SMF spam blocked by CleanTalk