Hey.
I never once knew how to make an obj, turf, or mob appear on only the user's screen; without it showing up on other peoples screens. I never got into all that..
Is there a way to make a Chest in a BYOND game, that the user can open and take the contents of, and then the treasure chest won't open again for that user, BUT other players will see the chest in its Closed form still, and can open the treasure chest for the first time and take one of whatever the chest's contents are?
In response to Konlet
|
|
I just re-read your question, and I believe I gave you advice for a different process. To perform what you want, I would possibly just create a list for the chest and when a player loots it, add that player to the list. When the player attempts to loot the chest, just perform nothing if they are in the list.
obj/chest |
Thank you. Is there a way for the icon of the chest to look closed to players that haven't opened it yet, but it has the opened up graphic to players that have already opened it before?
|
In response to MartialArtistAbu
|
|
I don't want to give bad advice, but technically this could be done with the invisibility variables. I guess you could use client.images, but you'd have to add the chest to the user's screen which wouldn't really be optimal. I'm gonna leave that part for someone else to answer.
|
Invisibility is the wrong tool for the job. I suggest that image() is the better option instead. However, it does require more setup.
What you'll probably need is some kind of area trigger that lets objects know when a player has entered the area, or some way to tell when a player gets within near viewing distance of an "observing" object. Once any player who's opened a chest gets within near viewing distance of it, you'll want to create and apply an image with the override var set, and show that image to that player. When all such players leave the view area, the image can and should be nixed. obj/chest/oneshot That's a fairly limited example and it could stand to be generalized a lot more, but that's the gist of what you'll want to set up. |
Some people would delve into this, but it can actually be done very simply. These two variables, invisibility and see_invisible, alone can perform what you're describing.
I don't want to go quoting the reference for you, so just click on those links and it'll direct you to where you can read up on it :)