ID:171354
 
1) How do you change a mob's view during the game? I tried "usr.view = 3" and that's undefined, so I dunno

2) How do you make it so players can walk over each other, but not walls or anything?
Try
src.view = src.viewpick
Then make it so they pick "view pick" as a number.
I dunno'.
In response to Hell Ramen
In response to Goz
That would work for a verb; but I was talking about mixing it with a proc and changing view when I go to a new level or something...I'll mess around with it
In response to Cowdude
Just look at the demo then you can easily modify/learn from it. We will not give you code to just copy and paste.

--Goz
In response to Goz
I know it works fine as a verb; but you can't make it into a proc, like I want to step on a tile and make it so the Entered() proc will call another proc to shrink the player's view down. Its a maze-like game; and the level is supposed to have a small view so its evilly difficult.
    F002Stairs      
Entered(mob/M)
usr.WinLevel()
usr.Floor = 3
usr.loc = locate(7,23,1)
screenchange()


that's what I'm using. the "screenchange" is where I want the view to shrink down to a 3x3 viewing area (view=2 iirc...maybe view = 1 though I've never messed with it)
In response to Cowdude
Here's a little snippet to play around with.
turf/viewdown
Entered(atom/a) // look at all atoms that enter this turf
if(ismob(a)) // if its a mob
var/mob/m = a // typecast it to a mob
if(m.client) // if m has a client
m.client.view = max(m.client.view-1,1) // change the clients view down a setting to a maximum of 1
turf/viewup
Entered(atom/a)
if(ismob(a))
var/mob/m = a
if(m.client)
m.client.view = min(m.client.view+1,10)


Basically when a player walks over these trufs, depending on which turf they walked over, their view will change. This ranges from a view of 1, to a view of 10.
In response to Lazyboy
Okay I got it to work. I just needed set values, not + or -, but that is still just as helpful

I just used
Entered(mob/M)</DM
and skipped the next line about if(ismob) though.

I still need the other half of my question though because its more important than the first one; since I've got 1 square wide corridors =(
In response to Cowdude
Just use denisity