ID:143182
 
Code:
mob
proc
Paralyzed()
while(Paralyze)
usr.Paralyze=1
usr<<"You cut [src]'s Tendons slowing their movement!"
usr.Savedspeed = usr.Move_Delay
usr.Move_Delay = 10
sleep(1200)
usr.Move_Delay = usr.Savedspeed
src<<"Your tendons miraculously heal!"
usr<<"[src]'s Tendons heal"
usr.Paralyze=0

Thats the Paralysis proc thingy

obj
ParalyzingK
icon = 'paralayzed kunai.dmi'
density = 1
Bump(A)
if(ismob(A))
var/mob/M = A
if(M.Kaiten||M.sphere)
return
if(M.counter)
del(src)
return
if(M.PK==0)
return
var/damage = round(src.nin*2)
if(damage >= 1)
M.health -= damage
M.Paralyzed()
view(M) << "[M] was hit by Paralyzing Kunai for [damage] damage!!"
var/mob/O = src.Gowner
M.Death(O)
del(src)
if(istype(A,/turf/))
var/turf/T = A
if(T.density)
del(src)
if(istype(A,/obj/))
del(src)

object i want to make it were when it hits the target it Paralyzes them
Problem description:
(no errors) i dont know why it wont Paralyze the target when the object hits them i have it set were if it bumps them it would Paralyze(slow there movements) them but its not working can some1 help?
i have tried many possiblites but none seem too work
                if(damage >= 1)
M.health -= damage
M.Paralyzed()//This checks if M is paralyzed. Which it isn't.
view(M) << "[M] was hit by Paralyzing Kunai for [damage] damage!!"
var/mob/O = src.Gowner
M.Death(O)

Take the while loop out of your Paralyzed proc.

(Sometimes I wonder where people these days learn to code?)
In response to Kaiochao2536
ok i got
mob
proc
Paralyzed()
usr.Paralyze=1
usr<<"You cut [src]'s Tendons slowing their movement!"
usr.Savedspeed = usr.Move_Delay
usr.Move_Delay = 10
sleep(1200)
usr.Move_Delay = usr.Savedspeed
src<<"Your tendons miraculously heal!"
usr<<"[src]'s Tendons heal"
usr.Paralyze=0


and
obj
ParalyzingK
icon = 'paralayzed kunai.dmi'
density = 1
Bump(A)
if(ismob(A))
var/mob/M = A
if(M.Kaiten||M.sphere)
return
if(M.counter)
del(src)
return
if(M.PK==0)
return
var/damage = round(src.nin*2)
if(damage >= 1)
M.health -= damage
M.Paralyzed()//This checks if M is paralyzed. Which it isn't.
view(M) << "[M] was hit by Paralyzing Kunai for [damage] damage!!"
var/mob/O = src.Gowner
M.Death(O)
del(src)
if(istype(A,/turf/))
var/turf/T = A
if(T.density)
del(src)
if(istype(A,/obj/))
del(src)


and im getting a runtime error

runtime error: Cannot modify null.Paralyze.
proc name: Paralyzed (/mob/proc/Paralyzed)
usr: 0
src: the pet (/mob/pet)
call stack:
the pet (/mob/pet): Paralyzed()
Lakitu (/obj/ParalyzingK): Bump(the pet (/mob/pet))
Lakitu (/obj/ParalyzingK): Move(the sand (47,45,5) (/turf/sand), 1)
In response to Lakitu
No put usr in proc. Ungh!
In response to Kaiochao2536
what do u mean, i have usr in my proc 7 times

mob
proc
Paralyzed()
usr.Paralyze=1
usr<<"You cut [src]'s Tendons slowing their movement!"
usr.Savedspeed = usr.Move_Delay
usr.Move_Delay = 10
sleep(1200)
usr.Move_Delay = usr.Savedspeed
src<<"Your tendons miraculously heal!"
usr<<"[src]'s Tendons heal"
usr.Paralyze=0
In response to Lakitu
...Replace usr with src.
In response to Kaiochao2536
mob
proc
Paralyzed()
src.Paralyze=1
usr<<"You cut [src]'s Tendons slowing their movement!"
src.Savedspeed = src.Move_Delay
src.Move_Delay = 10
sleep(1200)
src.Move_Delay = src.Savedspeed
src<<"Your tendons miraculously heal!"
usr<<"[src]'s Tendons heal"
src.Paralyze=0


um its not hitting them now its just ramming them and staying in place ...
In response to Lakitu
Put a spawn() before M.Paralyzed()...
In response to Kaiochao2536
K its still not Paralyzing them it just hits and dose the damage, but no Paralyzing takes place

obj
ParalyzingK
icon = 'paralayzed kunai.dmi'
density = 1
Bump(A)
if(ismob(A))
var/mob/M = A
if(M.Kaiten||M.sphere)
return
if(M.counter)
del(src)
return
if(M.PK==0)
return
var/damage = round(src.nin*2)
if(damage >= 1)
M.health -= damage
spawn()
M.Paralyzed()//This checks if M is paralyzed. Which it isn't.
view(M) << "[M] was hit by Paralyzing Kunai for [damage] damage!!"
var/mob/O = src.Gowner
M.Death(O)
del(src)
if(istype(A,/turf/))
var/turf/T = A
if(T.density)
del(src)
if(istype(A,/obj/))
del(src)


mob
proc
Paralyzed()
src.Paralyze=1
usr<<"You cut [src]'s Tendons slowing their movement!"
src.Savedspeed = src.Move_Delay
src.Move_Delay = 10
sleep(1200)
src.Move_Delay = src.Savedspeed
src<<"Your tendons miraculously heal!"
usr<<"[src]'s Tendons heal"
src.Paralyze=0
In response to Lakitu
Did you override Move() to work with those delays?
In response to Kaiochao2536
Say what?.....probably not -.-, but i think i did
In response to Kaiochao2536
when u say override are u talking about something like this

tmp/Savedspeed = 1.2

or dose that anything to do with it?
In response to Lakitu
Variables don't change the speed. Move() changes the speed.
In response to Kaiochao2536
so how would i overide move() then?
mob/Move()//Move proc
if(src.Frozen)//they can't move if they're locked
return
else
..()
if(src.client)
for(var/mob/npcs/Bunshin/B in world)
if(B.original == src)
if(B.Frozen||B.moving)
return
else
walk_towards(B,src)

thats my move proc
In response to Lakitu
Make it so the move delay variables actually work, maybe?
mob/Move()//Move proc (no wai)
if(src.Frozen)//they can't move if they're locked (orly)
return
else
..()
src.Frozen=1
sleep(Move_Delay) //Insert your move delay variable there.
src.Frozen=0
if(src.client)
for(var/mob/npcs/Bunshin/B in world)
if(B.original == src)
if(B.Frozen||B.moving)
return
else
walk_towards(B,src)
In response to Kaiochao2536
eeeek now i move slow no matter what, and im still not get the paralasis thing to work object still hits and no effect of paralyzing
and i put

mob/Move()//Move proc (no way)
if(src.Frozen)//they can't move if they're locked (orly)
return
else
..()
src.Frozen=1
sleep(Savedspeed) //Inserted move delay variable here.
src.Frozen=0
if(src.client)
for(var/mob/npcs/Bunshin/B in world)
if(B.original == src)
if(B.Frozen||B.moving)
return
else
walk_towards(B,src)

AHHHHHHHHHHH
In response to Lakitu
Can you not figure it out yourself? Do I have to hold your hand through the whole thing?

Apparently. This is the last time, though.
Use Move_Delay as your variable, not Savedspeed. Don't get your variables mixed up.
In response to Kaiochao2536
T.T that still did not change anythign everything is the same im stillmoving the slow speed without getting paralyzed and the paralysis is still not working and got

mob/Move()//Move proc (no way)
if(src.Frozen)//they can't move if they're locked (orly)
return
else
..()
src.Frozen=1
sleep(Move_Delay) //Inserted move delay variable here.
src.Frozen=0
if(src.client)
for(var/mob/npcs/Bunshin/B in world)
if(B.original == src)
if(B.Frozen||B.moving)
return
else
walk_towards(B,src)


obj
ParalyzingK
icon = 'paralayzed kunai.dmi'
density = 1
Bump(A)
if(ismob(A))
var/mob/M = A
if(M.Kaiten||M.sphere)
return
if(M.counter)
del(src)
return
if(M.PK==0)
return
var/damage = round(src.nin*2)
if(damage >= 1)
M.health -= damage
spawn()
M.Paralyzed()//This checks if M is paralyzed. Which it isn't.
view(M) << "[M] was hit by Paralyzing Kunai for [damage] damage!!"
var/mob/O = src.Gowner
M.Death(O)
del(src)
if(istype(A,/turf/))
var/turf/T = A
if(T.density)
del(src)
if(istype(A,/obj/))
del(src)


mob
proc
Paralyzed()
src.Paralyze=1
usr<<"You cut [src]'s Tendons slowing their movement!"
src.Savedspeed = src.Move_Delay
src.Move_Delay = 10
sleep(1200)
src.Move_Delay = src.Savedspeed
src<<"Your tendons miraculously heal!"
usr<<"[src]'s Tendons heal"
src.Paralyze=0


i dont c y ur yelling at me im doing everything ur telling me to and its not working