Set creeper visibility on or off via script?

Started by cquante, July 08, 2014, 09:47:16 PM

Previous topic - Next topic

cquante


Is there a way to turn creeper visibility on or off with a script while the game is running? Naturally if it was part of the map-play, it would be handy to be able to also prevent the player from turning the visibility back on prematurely.

Thanks!


Relli

There does not seem to be a way to do that. The closest I can think of would be to change the color of the creeper to something hard to see, and if the player tries to reset it, forcefully change it back again. But that method is just full of holes.

ParkourPenguin

The short answer is that I don't know of any easy ways of doing it. However, there might be a couple roundabout methods of getting what you want done.

If you REALLY wanted to, you might be able to take an image of the terrain, break it up into multiple images, and make a ton of CRPL cores with images set to their respective background, but that would be way too much work for what you would get out of it in my perspective.

Depending on your situation, you could also mess around with the camera controls. You could see if the player is trying to move the camera to a place you don't want them to view using GetCameraPosition, and you can set it back using SetCameraPosition. You would also have to use a similar setup for GetCameraZoom and SetCameraZoom to prevent the player from simply zooming out a bunch.
"Only a life lived for others is a life worthwhile."
-Albert Einstein