ID:156548
 
mob
verb
Say(msg as text)
view(3,src) << "[Name]: [html_encode(msg)]"
OOC(msg as text)
world << "[src]: [html_encode(msg)]"
Perception()
for(var/t/turf in view(5))
if(t.hidden)
if(src.Perception => t.UnrevealPoint)


This is how im doing my perception checks. But im unsure on how to make the wall appear to the player that it is hidden. I'm not sure what to do, wether to delete the wall (but letting other people see it), or make it that only the person who has high enough perception ability to see it and let them to travel through it.
Im not sure what your trying to do?
So you want a verb that effectively allows users to pass through a dense object if the perception is high enough?

As maybe using the enter proc maybe better in this situation on the desired turf.

You could use the Move() proc to execute something if you just want to make the turfs appear. If so though, you should not be using turfs. As you will just have black spots were the turfs that remain hidden are. As turfs do not fall on top of each other but instead replace each other.

Also out of curiosity if anyone reads this knows, does view() generate turfs in its list? Some reason I believe its only mobs and objs.

In response to Tonyth
I mean i have a verb that checks if there's an hidden wall but i want the user to be alerted that there's an hidden wall and the location is shown to the client.
In response to Gamemakingdude
Gamemakingdude wrote:
I mean i have a verb that checks if there's an hidden wall but i want the user to be alerted that there's an hidden wall and the location is shown to the client.

I see.

Well it looks like the code you've done is pretty much there then.
mob
verb
Perception()
var/turf/t
for(t in orange(5))
if(t.hidden && src.Perception => t.UnrevealPoint)
usr << "[t.x]:[t.y]:[t.z]"
t.hidden = 0 //or whatever here
In response to Tonyth
how about this...

An arrow over the hidden items and it only appears on the client screen?
In response to Gamemakingdude
Why not add a fade to your hidden items.

It could be easily done in an image editing software simply copy the image into it then reduce the opacity of the layer to 0. The slowly increase the opacity taking snapshots along the way and putting them in your dmi animation.

It would give a nice effect especially if there is multiple hidden items and they all just fade onto the users screen. It is also not a difficult effect to make.
In response to Tonyth
What about displaying it only to the client?
In response to Gamemakingdude
Well that depends on why its being revealed.
If in terms of revealing walls, your game is trying to encourage team play. Then revealing to all would be useful as then people would possibly ask around for players with high perception to help them out.

However you could possibly add another variable to the hidden turfs/objects themselves like share or something.

//rest of verb
if(t.share == 1)
//visible to everyone
else
//visible to client


Then if you have like actual contents hidden such as a potion, or whatever is relevant to your game. Then those items you would really want only the user to see to prevent 'stealing'
Unless you would like to see thieves running around.
In response to Tonyth
That's still not speciftic enough...

I need actual code like c.screen or something!
In response to Gamemakingdude
if you were to make it so that the objects fade in on your screen then fade out again when they use the verb and they are to only be viewed by you.
You could make it so that the user cant move during perception then do a bit of math to work out screen.loc locations.
SposX = t.x - usr.x
SposY = t.y - usr.y
//Then dependent on your screen view if you have a view of 7
screen_loc = "[8+SposX],[8+SposY]"


Then add them all the things in view to the targets screen and to a list.
Then make it sleep for however long you want them to stay on the screen then delete the list for the users screen.

With this method you would have to make it so the user could interact with the item as it was hidden. If it was an item to pick up or something.

Im not sure how you would permanently make an object reveal just for one person.
Gamemakingdude wrote:
This is how im doing my perception checks. But im unsure on how to make the wall appear to the player that it is hidden. I'm not sure what to do, wether to delete the wall (but letting other people see it), or make it that only the person who has high enough perception ability to see it and let them to travel through it.

You need to set the object's level of invisibility. In your case, you can set it to one. Once a mob can view that object, set their see_invisible variable to one.
In response to RJTaylor
That's a rather tricky concept in a multiplayer environment, as you can see when you try to find suitable values for three different hide-able objects and four players. Actually, you're going to find it impossible to solve, which is why BYOND supports client based images, commonly used in such a scenario.