Adventure Game Studio

AGS Support => Advanced Technical Forum => Topic started by: Kinoko on Tue 13/09/2005 07:47:47

Title: object.Visible not working?
Post by: Kinoko on Tue 13/09/2005 07:47:47
I'm not currently using any of the betas, just the previous full version of AGS (whatever that is, I'm a bit sleepy and typing from work so I can't check), but I've noticed something lately I can't explain. Some of my object based scripting wasn't activating and all I can put it down to was when the object was NOT checked as `object is initially on/visible`. I was then using object[ x ].Visible = true; to turn it on, but it didn't... er, turn on.

Is/was this a bug? Because if not, I have no idea where I've gone wrong. I worked around it so I don't have any particular problem, but I still wonder why that seemed to be happening.

[edit by scorpiorus to fix object[ x ] ]
Title: Re: object.Visible not working?
Post by: Rulaman on Tue 13/09/2005 09:07:39
Do you use object[0].Visible = true; ?
Title: Re: object.Visible not working?
Post by: Gilbert on Tue 13/09/2005 09:08:50
Hmmm, did you just typed something like:
object[2].Visible;
or:
object[2].Visible=true;

It's a "variable" property that you have to set it's value to work.

That of course, provided you're using V2.7 by "previous full version" you're mentioneing.

Edit:Yeah. Rulaman was faster, I'll post anyway.
Title: Re: object.Visible not working?
Post by: Kinoko on Wed 14/09/2005 04:55:07
Erm, I was indeed, but for some reason it's not showing up properly in my original post (stupid Japanese laptop).

That may not have been the problem, but that's what it seemed to be. No other objects had this problem, only the ones I set as initially off, then tried to turn back on.

As I said, no problem as I worked around it but I just wondered if this was a bug or not...
Title: Re: object.Visible not working?
Post by: Gilbert on Wed 14/09/2005 05:41:41
That's odd, is it possible the object placed at coordinates that it's outside of the screen?
Title: Re: object.Visible not working?
Post by: Kinoko on Wed 14/09/2005 07:06:41
Nope, they're all definitely in the right place. They were all associated with the correct view, and set off at the right time... I double checked everything I could think of.

I'll go home today and try to replicate the problem, but I mean, if it isn't happening to anyone else, it doesn't really matter.
Title: Re: object.Visible not working?
Post by: Scorpiorus on Wed 14/09/2005 14:23:08
I just gave it a go and it worked fine. I set them initially invisible but could successfully show them with the Object.Visible property.

By the way, is there a chance they get reset (.Visible=false) within repeatedly_execute in either room script, global script or possibly some script module?
Title: Re: object.Visible not working?
Post by: monkey0506 on Wed 14/09/2005 22:19:15
Quote from: Kinoko on Wed 14/09/2005 04:55:07for some reason it's not showing up properly in my original post (stupid Japanese laptop)

You may be referring to the bullet I think?