I could have sworn I saw something on this subject at one point, but I can't find it now.
Is it possible to define an object to appear differently to different players? For example, something that is invisible to player one, but clearly on the map for player two? Or a disguise you can wear that only some people can see through?
Am I asking too much from DM?
ID:180450
![]() Jun 11 2001, 5:05 am
|
|
![]() Jun 11 2001, 6:59 am
|
|
The image() proc should do the trick.
|
Ok, looking through the DM reference, this example is given:
var/Box Box = image ('highlight.dmi', usr) usr << Box Am I right to assume that the line "usr << Box" is assigning the visual to usr? If so, can it also be assigned to a list as in: "view() << Box"? Assuming this worked, would everyone originally assigned the view always see the overlay, even if they went away and came back? Also, is there a way to remove the view from specific people selectively, or would I have to delete the image instance and reassign? Thanks for your help, .s On 6/11/01 9:59 am Tom wrote: The image() proc should do the trick. |
var/Box
Box = image ('highlight.dmi', usr) usr << Box 1. What happens if you define a verb here? Will it be available only to usr (or at all)? 2. Is there easy access to the list of people who can view Box? I'd like to query that image and ask it who "knows" about it. On 6/11/01 9:59 am Tom wrote: The image() proc should do the trick. |
On 6/11/01 11:23 am Skysaw wrote:
var/Box usr << Box makes it so that the usr, and only the usr, can see that image. Not sure I understand your question, sorry... 2. Is there easy access to the list of people who can view Box? I'd like to query that image and ask it who "knows" about it. Nope... you'd have to make a list yourself. image()s are a lot of work! But they're worth it, sometimes. |
On 6/11/01 12:12 pm Spuzzum wrote:
On 6/11/01 11:23 am Skysaw wrote: To clarify, suppose you had: view() << BoxLet's say three people are within view when the code is executed. Later a fourth person comes by, and they do not see it. So far so good... Now suppose I had attached a verb to the Box: var/Box Box = image ('highlight.dmi', usr) view() << Box verb smash() set src in view(1) usr << "You smashed the box!"Will the verb be available to those who see the image? Will it be available to those who don't (who are within range)? |
The image() is just a visual cue. It does not have any effect on any objects in the game, so it won't determine verb accessibility and such.
You can probably send the same image to different players at different times by storing it and using it as necessary: var/I = image('ghost.dmi',usr) usr << I ... view() << I but you can't selectively remove the image(). You'll have to delete it and create it again. This is one feature that we can expand quite dramatically in the future. I have a feeling that it might not be suited exactly for the scenario you have in mind, but you may be able to get it to work. Gazoot did some innovate things with image() in his Sneak! game. |
On 6/11/01 1:52 pm Tom wrote:
This is one feature that we can expand quite dramatically in the future. I have a feeling that it might not be suited exactly for the scenario you have in mind, but you may be able to get it to work. Gazoot did some innovate things with image() in his Sneak! game. DragonSnot also uses image() to very good effect. The panel of trench buttons on the left is done through images, such that each player has a different image of what trench is available to them. The button objects track which player is being shown which image, and respond accordingly when the player clicks on it. It's one I'd be happy to do a demo for, though I don't know how many people are going to try things like that. |
Count this as a vote for a selective removal upgrade!
My game will sort of need the opposite of what would normally be expected here. When a player dons a disguise, everyone will see the disguise icon. However, one by one they may see through the disguise... hence the need for selective removal. I guess I'll hafta do it all by hand. :-/ On 6/11/01 1:52 pm Tom wrote: The image() is just a visual cue. It does not have any effect on any objects in the game, so it won't determine verb accessibility and such. |
Took me all of two minutes to realise the easy solution to my problem...
Let the disguise routine use the disguise icon as a normal overlay, then another object of the original player icon on top which initially no one sees. Then add users who see through the disguise to the view list for the top icon, and hey presto! Um, was that clear? On 6/11/01 5:10 pm Skysaw wrote: Count this as a vote for a selective removal upgrade! |