Level Up system does not work. in Developer Help
|
|
When my exp reaches 100 i just keep gaining it instead of it resetting. Anyone know why? It is also properly indented in the compiler it came out wrong when i pasted
mob proc Levelup() if(src.exp>=src.maxexp) src.level++ src.exp=0 src.maxexp*=2 src.maxhealth*=1.2 src.Ninjutsu*=1.2 src.Genjutsu*=1.2 src.Chakra*=1.1 src.Taijutsu*=1.1 src<<"You gained a level!" src.Statup() else ..()
mob proc Statup() src.maxhealth+=20 src.health=src.maxhealth src<<"Your stats increase!"
mob Stat() ..() statpanel("Stats") stat("Health","[health]/[maxhealth]") stat("Experience","[exp]/[maxexp]") stat("Level",level) stat("Chakra",Chakra) stat("Ninjutsu",Ninjutsu) stat("Genjutsu",Genjutsu) stat("Taijutsu",Taijutsu)
mob var/list/moves ... New() ..() moves=list() var/list/level_learned_moves=list( "Kawarimi no jutsu"=5, "Bunshin no jutsu"=10, "Henge no jutsu"=10)
mob var health = 100 maxhealth = 100 exp = 0 maxexp = 100 level = 1 Ninjutsu = 20 Taijutsu = 20 Genjutsu = 20 Chakra = 1000
obj/Log icon='tree log.dmi' density=1 verb/Hit() set src in view(1) usr<<"You are aware of a crack in the log.." usr.exp+=5 <dm>
|
|
The reasion your levelup isn't working is that you never call the proc.
You also don't need the Statup() proc. That should just be stuck in with Levelup().
Lummox JR