mob/var/trans_delay = 0
obj/Transform/Transform
verb
Transform()
set category = "Combat"
if(usr.doing == 1)
usr << "You are already doing something!"
return
if(usr.rest == 1)
usr << "You cannot Transform whilst resting!"
return
if(usr.trans_delay == 1)
usr << "You must wait again before Transforming!"
return
usr.trans_delay = 1
spawn(35) usr.trans_delay = 0
if(usr.race == "Namek")
usr.Namek_Trans()
if(usr.race == "Half Saiyan")
usr.Half_Saiyan_Trans()
if(usr.race == "Majin")
usr.Majin_Trans()
if(usr.race == "Changling")
usr.Changling_Trans()
if(usr.race == "Saiyan")
usr.Saiyan_Trans()
if(usr.race == "Human")
usr.Human_Trans()
if(usr.race == "Kat-mazon")
usr.Tuffle_Trans()
mob/proc/Namek_Trans()
if(src.doing == 1)
return
else
if(src.form_1 == 0)
if(src.powerlevel_max >= 100000 && src.level >= 100)
src.safe = 1
src.doing = 1
src.icon_state = "enrage"
src.frozen = 1
sleep(19)
src.powerlevel_max *= 30
src.ki_max *= 8
src.strength_max *= 5
src.defence_max *= 4
src.speed_max *= 4
src.powerlevel = src.powerlevel_max
src.ki = src.ki_max
src.strength = src.strength_max
src.defence = src.defence_max
src.speed = src.speed_max
view(6) << "<font color = green>[src.name] transforms into a Super Alien!"
src.icon_state = ""
new/obj/techs/Overlays/Crater_Small(src.loc)
src.transformed = 1
src.form_1 = 1
src.frozen = 0
src.doing = 0
src.safe = 0
return
else
if(src.form_2 == 0)
if(src.powerlevel_max >= 5000000 && src.level >= 750)
src.safe = 1
src.doing = 1
src.icon_state = "enrage"
src.frozen = 1
sleep(19)
src.powerlevel_max *= 15
src.ki_max *= 15
src.strength_max *= 7
src.defence_max *= 6
src.speed_max *= 6
src.powerlevel = src.powerlevel_max
src.ki = src.ki_max
src.strength = src.strength_max
src.defence = src.defence_max
src.speed = src.speed_max
view(6) << "<font color = green>[src.name] transforms into a Ascended Alien!"
src.icon_state = ""
src.transformed = 1
src.form_2 = 1
src.frozen = 0
src.doing = 0
src.safe = 0
return
else
if(src.form_3 == 0)
if(src.powerlevel_max >= 50000000 && src.level >= 1500)
src.safe = 1
src.doing = 1
src.icon_state = "enrage"
src.frozen = 1
sleep(19)
src.powerlevel_max *= 25
src.ki_max *= 25
src.strength_max *= 10
src.defence_max *= 8
src.speed_max *= 9
src.overlays += green_elec
src.powerlevel = src.powerlevel_max
src.ki = src.ki_max
src.strength = src.strength_max
src.defence = src.defence_max
src.speed = src.speed_max
view(6) << "<font color = green>[src.name] transforms into a Super Alien 2!"
src.icon_state = ""
src.icon = 'Namek - Super.dmi'
src.transformed = 1
src.form_3 = 1
src.frozen = 0
src.doing = 0
src.safe = 0
return
my trans verb doesnt work if i use it ingame it says "u must wait before transforming again" but havent transed yet... help me plz
Well, obviously - the first thing you might want to look at is why that message is being displayed.
If that message is being displayed it means somewhere's in your code "trans_delay" is being set to 1. Personally, I'm not a fan of setting boolean variables. For sensitive stuff such as delay timers, I use time stamps. That way, if the proc stops or that variable isn't set back to its original value, checking against a time stamp to current time is more safe. EX:
Also, your design for the one transform verb is flawed. Instead of doing a bunch of different if(race=="blah") just make an individual "obj" for each race.
ex:
Then, all you do is give each race its appropriate transformation "obj" when they achieve it.