ID:177034
Nov 16 2002, 2:42 pm
|
|
I made a paralysis spell but I can't seem to make it freeze the person...? how do i do that?
|
Make a paralysis variable for mobs:
<code>mob/var/paralysis = 0</code> Then, whenever a mob tries to move, check to see if they're paralyzed or not, and if they are, cancel the movement proc: <code>mob/Move() if(src.paralysis) return ..()</code> Then, to paralyze something, just run a little proc that temporarily sets its paralysis to 1. <code>mob/proc/Paralyze(time) src.paralysis = 1 spawn(time) src.paralysis = 0 return</code> |
In response to Foomer
|
|
Wouldn't the proc return before the mob is unparalyzed? Don't you want sleep?
|
In response to Garthor
|
|
Garthor wrote:
Don't you want sleep? No. |
Move()
if(Paralyzed)
return 0
else return ..()
verb
Paralyze(mob/M)
M.Paralyzed = 1
var/Paralyzed