object.Visible not working?

Started by Kinoko, Tue 13/09/2005 07:47:47

Previous topic - Next topic

Kinoko

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 ] ]

Rulaman

Do you use object[0].Visible = true; ?
Zak: Komm mit mir Sushi.
Zak: Come with me Sushi.

Gilbert

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.

Kinoko

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...

Gilbert

That's odd, is it possible the object placed at coordinates that it's outside of the screen?

Kinoko

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.

Scorpiorus

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?

monkey0506

#7
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?

  • <-- That one.

    If you type a '[' followed by a '#' and a ']', it creates that bullet.

  • <-- It's actually this one.

    Yes, it's the same bullet, but I found (by quoting the first post to check what you actually typed), that a '[', 'x', ']' also makes the same bullet.

    I think that may be why it's "not showing up properly". ;)


    [edit by scorpiorus]: yeah, that's it. : )

SMF spam blocked by CleanTalk