ID:159888
 
How would I simulate an earthquake effect with screen shaking.

Thanks!
You could try using pixel offsets
You would do it by randomly moving the 'camera' around. This used to be possible only by moving the player's eye around to turfs next to him and as such, but in BYOND 4.0 the client's eye can be pixel-offset for finer movements.
I prefer get_step(), its simple and straight forward and it has a duration.

mob
proc
Quake_Effect(duration)
if(!src.client)return
spawn(1)
var/oldeye=src.client.eye
var/x
for(x=0;x<duration,x++)
src.client.eye = get_step(src,pick(NORTH,SOUTH,EAST,WEST))
sleep(1)
src.client.eye=oldeye
In response to Dranzer_Solo
Uh, excuse me, but it doesn't look like you really know what you're talking about. I admit you do know how to copy code from demos, though. ;P But you should try to refrain from talking about such code if you don't fully understand it.
In response to Dranzer_Solo
Also known as hub://AbyssDragon.QuakeEffect way to go.
In response to Mizukouken Ketsu
thanks guys, i finished it =]