ID:174688
![]() Jul 25 2003, 3:09 pm
|
|
I would like to be able to make turfs (i.e. lava) deal damage when stepped on.
|
![]() Jul 25 2003, 3:12 pm
|
|
turf
Lava icon = 'icon.dmi' icon_state = "state" density = 0 usr.hp -= [damage here without bractes] usr << " You Where burnt by the lava" |
SSChicken wrote:
> turf Just wondering, but why use istype(M) without specifying a path? Couldn't you use ismob? I don't use ismob,istype, etc often, so Im just wondering. |
turf
lava icon='lava.dmi' Entered(atom/movable/M) if(ismob(M)) src.Damage(M) return ..() proc Damage(mob/Damaged) while(Damaged in src.loc) Damaged.hp-=20 sleep(10) |
mob/var/lava = 0
turf/Lava icon stuff ect Enter() usr.lava = 1 usr.lava(usr) Exit() usr.lava = 0 mob/proc/Lave(N) if(usr.lava == 1) usr.hp -= 5 spawn(10) usr.lava(usr) else return 1 that might work made it in the post so tabing isnt right |
Hendrix wrote:
mob/var/lava = 0Since you are helping people, and I want people to be helped, I am going to correct you here so you can help people better :D NEVER use usr in procs. Especially in Enter(), Entered(), Exit(), and Exited(). Airjoe |
Polaris139 wrote:
what does the sleep do?It makes it so if you u had sleep(30) when it hits 30(3 seconds) it will do the command |