ID:267855
 
As the title says it, it doesn't work!
Oh wait...thats not my question... :O

Seriously, I need help on view()
How do I, for example, send a message ONLY to someone in the same room as I am.
I want it to send it to everyone in the room, but if it passes a density=1 object, it won't get there.

Example map...

WWWWWWWWWWWWWWWW
W M W
W F W
W W
WWWWWWWWWWWWWWWW
L

W = Wall
M = Me
F = Friend
L = Listener (someone next to a wall)

Now I say something, and F and M hears it, but L does not hear it, even trough I can see L trough the wall.

Is there any way of doing so?
And, perhaps a way to create atoms whitin the walls (I want to create air in a space kind of sim)

* EDIT *
If you have a fully working air / plasma / no air etc. system, please contact me!
view(6)
Add a area over each room, labelling it, when you enter that area make the person's ROOM LABEL become the room's name. When you speak make it only show to people with the same room label as the speaker.

Siientx
In response to Wolf01
You assume each room is 6 tiles as wide as the mob?

Siientx
In response to Siientx
mob
var
currentroom = null

area
room1
usr.currentroom = "room 1"

mob
verb
Say(msg as text)
set category = "Communicate"
set name = "Say"
for(var/mob/M in world)
if(M.currentroom = src.currentroom)
usr << "[usr] says: [(msg)]"

add the area to the part inside the walls where your friend and you are. that might work. haven't tried it yet.
In response to ZDarkGoku
No.
I ment that it may not be trough walls.

Look... I want to place an 'air' area and a 'plasma' area on specific parts.
WWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWW
WPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPW
WPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPW
WWWWWWWWWDWWWWWWWWWWWWWWWWWWWWWWWW
WAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAW
WAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAW
WAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAW
WWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWW

W = Wall - P = Plasma - A = Air - D = airlock door (with setting variable)
I want plasma to be stronger than air.
If someone opens the door while var/airlock != 1 then the plasma takes over the air, and...
WWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWW
WPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPW
WPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPW
WWWWWWWWWDWWWWWWWWWWWWWWWWWWWWWWWW
WPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPW
WPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPW
WPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPW
WWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWW

So basicly.
I want to make the Plasma go into the bottom room if the door gets opened without the airlock variable being 1.

I've tried 'cloning' the plasma, and when it is cloned, it makes a copy of itsself, but it got VERY laggy.
In response to Phoenix Man
Phoenix Man wrote:
No.
I ment that it may not be trough walls.

Look... I want to place an 'air' area and a 'plasma' area on specific parts.

WWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWW
WPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPW
WPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPW
WWWWWWWWWDWWWWWWWWWWWWWWWWWWWWWWWW
WAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAW
WAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAW
WAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAW
WWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWW

W = Wall - P = Plasma - A = Air - D = airlock door (with setting variable)
I want plasma to be stronger than air.
If someone opens the door while var/airlock != 1 then the plasma takes over the air, and...

WWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWW
WPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPW
WPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPW
WWWWWWWWWDWWWWWWWWWWWWWWWWWWWWWWWW
WPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPW
WPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPW
WPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPW
WWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWW

So basicly.
I want to make the Plasma go into the bottom room if the door gets opened without the airlock variable being 1.

I've tried 'cloning' the plasma, and when it is cloned, it makes a copy of itsself, but it got VERY laggy.

how you get from say verb in oview behind walls to plasma and air?
In response to ZDarkGoku
I just need a way so my air support, "Plasma" and "Air" can spread out.

It needs to spread out, but it must not spread out to areas it cannot spread out to.

I've tried cloning it and making it randomly move, but all it does is cause lag.

Can anybody help me?

* EDIT *
I almost forgot!
I've got a input here...

aircontrol
icon_state = "aircontrol"
density = 1
verb/Change_Air()
switch(input("Please select the type of air that you wish to change the area to.","") in list(\
"Air","No Air","Plasma"))
if("Air")
??

What do I put at ??
I need a way to make the whole room filled with area/air.
How do I do this, without lag, just in the room I am in?
Seriously, I need help on view()

All your view() related questions can be answered here.
http://www.byond.com/docs/ref/info.html#/proc/view

How do I, for example, send a message ONLY to someone in the same room as I am.

This would be tricky depending on exactly what you consider to be a room. The easiest solution would be to have a seperate area for each room then send the message to everyone in the same area.
In response to Theodis
But...
I just want one specific thing.

I want the air that I release to change all areas in the view of usr.
Thats easy, just do a for(var/area/A in view()) and A = new /area/air

Problem is, I want it to do in all areas inside usr's view, UNLESS the area is blocked by a dens object.
Better saying, I want to put air on every area usr can see and if a dens object is blocking the path, it will NOT build it on the dens object & beyond the dens object.
In response to Phoenix Man
Phoenix Man wrote:
I just need a way so my air support, "Plasma" and "Air" can spread out.

It needs to spread out, but it must not spread out to areas it cannot spread out to.

I've tried cloning it and making it randomly move, but all it does is cause lag.

Can anybody help me?

* EDIT *
I almost forgot!
I've got a input here...

aircontrol
icon_state = "aircontrol"
density = 1
verb/Change_Air()
switch(input("Please select the type of air that you wish to change the area to.","") in list(\
"Air","No Air","Plasma"))
if("Air")
??

What do I put at ??
I need a way to make the whole room filled with area/air.
How do I do this, without lag, just in the room I am in?

area
room1
var
areafill = "Air"

in the if("Air") chanfe the areafill var to Air and same thingf for plasma but change it to "Plasma" instead
In response to ZDarkGoku
ZDarkGoku wrote:
mob
var
currentroom = null

area
room1
usr.currentroom = "room 1"
That'd do nothing but cause compile errors.
In response to Theodis
You're such an idea stealer Theodis. =P

Siientx
In response to Phoenix Man
Wait!
Let me put this to ONE SMALL QUESTION!

WWWWWWWSSSSSSSSSSSSSSSSSSSSSSSSSSSS
W WSSSSSSSSSSSSSSSSSSSSSSSSSSSS
W X WSSSSSSSSSSSSSSSSSSSSSSSSSSSS
W DSSSSSSSSSSSSSSSSSSSSSSSSSSSS
WWWWWWWSSSSSSSSSSSSSSSSSSSSSSSSSSSS

W = Wall
D = Door
X = Me
S = Space

Both W (Wall) and D (Door) have opacity=1

for(var/turf/X in view())
Will this INCLUDE S (Space)?

Will a view() proc include atoms behind something with opacity=1?
In response to Phoenix Man
Yep.
In response to Phoenix Man
view() is not being recognized to any type of atom. So, no...no one will hear it. It's null, adhere an atom to it and give it a distance and it should work.

view(6,src)