Page 1 of 1

Any way to change object/projectile visibility via script?

Posted: Wed Mar 24, 2010 5:26 pm
by Isolder
You can do it with Units. It's real dandy.

I want to change object and/or projectile/scenery visibility through a map action.

Does anyone know of a way to do this?

Re: Any way to change object/projectile visibility via script?

Posted: Wed Mar 24, 2010 8:20 pm
by A-Red
Object Control, or OBCO. You can reveal all, reveal a random instance, or hide all instances of a projectile of a given type.

If you want a specific object to disappear and none of those flags will work, the best way is to have a CTRL give it to a hidden uncontrollable unit, thereby making it "disappear."

Re: Any way to change object/projectile visibility via script?

Posted: Thu Mar 25, 2010 1:32 am
by Isolder
A-Red wrote:Object Control, or OBCO. You can reveal all, reveal a random instance, or hide all instances of a projectile of a given type.

If you want a specific object to disappear and none of those flags will work, the best way is to have a CTRL give it to a hidden uncontrollable unit, thereby making it "disappear."
Man, I don't know enough about scripting to understand why this isn't possible to do directly.

There's already an object_identifier that makes it possible to select individual objects. Why oh why isn't it possible to then make a generic action to switch the invisible flag in the marker of the objects in object_identifier on or off.

I also would like to be able to control Scenery objects. No identifiers for those though..

It feels like this should be possible.

Re: Any way to change object/projectile visibility via script?

Posted: Thu Mar 25, 2010 10:07 pm
by A-Red
No, you can't remove scenery objects, but technically you could make a projectile that looks just like scenery, use it instead, and remove it.