Visibility Groups

by Forum_account
[Documentation] [Share] [Zip]
To download this library for your Linux/Mac installation, enter this on your command line:

DreamDownload byond://Forum_account.VisibilityGroups##version=3

Emulator users, in the BYOND pager go to File | Open Location and enter this URL:

byond://Forum_account.VisibilityGroups##version=3

394 downloads
Version 3
Date added: Oct 2 2011
Last updated: Mar 18 2012
12 fans
A library to manage image objects. [More]
This library lets you assign atoms to visibility groups and lets you specify which visibility groups a player can see. Image objects are used and managed by the library to hide or show objects based on the visibility group assignments. For example:

mob
proc
die()
// when a player dies they become a ghost and can see ghosts
vis.is_a(GHOST)
vis.can_see(GHOST)

respawn()
// when the player respawns they are no longer a ghost and cannot see ghosts
vis.is_not_a(GHOST)
vis.cant_see(GHOST)


The library manages the image object to make the dead players only visible to players that can see ghosts.

Version 3
• Changed how image objects are used. Previously, an atom's display would be replaced with an image object when its vis object was created. Now, the atom is replaced with an image object only when they're added to a visibility group (when you call the vis.is_a() proc). The reason for this is that you might have a mob who isn't in any visibility groups but has a vis object just to limit what they can see - since this mob is not in any groups they're seen by all players and don't need to be represented by an image object.

Version 2
• Added a demo that shows how to create roofs that are shown when you're outside the building, but hidden when you're inside the building.

Version 1
• Initial posting

More Info

new library by Forum_account

Advertisement

Comments

KururugiSuzaku: (Aug 31 2013, 8:13 am)
This library's really neat. Thanks F_A, I learned a lot from it.
Flysbad: (Mar 11 2012, 8:35 pm)
Good job, :3 I might use it .