ID:166117
![]() Sep 21 2006, 2:46 pm
|
|
how do i make it so when ur a character of a certain class dies you spawn but as a different class
|
1. You should use the <DM> tags; they help.
2. Assume it's implemented like this. What happens if the player logs out? The procedure will return, the mob (probably) gone. Might cause some havoc when the player logs back in later and finds his character is semi-dead. 3. Consider not putting curse words in your code (unless it's a swear filter. =P), as they're disallowed on these forums. |
mob |
mob/proc/DeathClass() |
Gah! <_<
I thought for sure you'd break the if() switches. Simply use a list to record all of the classes minus the class the person just was, and use that list for a random class picking. mob/proc/DeathClass() To make it even easier to use, and more robust I might add, you can make typesof(/mob/class)-/mob/class the value of L so you don't have to retype something into the list everytime you add a class. I use -/mob/class at the end of it because typesof() includes the path you specify and every path under it. |
then add a Death Proc
mob
proc
Death()
switch(input("Choose new class Bitch?","?Ho?",text) in list ("Ninja","Bitch","Ho"))
if("Ninja")
usr.class = "Ninja"
usr.icon = 'Ninja.dmi'
usr.loc=locate(/turf/ninjastart/)
if("Bitch")
usr.class = "Bitch"
usr.icon = 'Bitch.dmi'
usr.loc=locate(/turf/bitchstart/)
if("Ho")
usr.class = "Ho"
usr.icon = 'Ho.dmi'
usr.loc=locate(/turf/Hostart/)
else
return