ID:140019
 
First Code
mob
proc
DeathCheck(mob/Target)
if(Target.powerlevel <= 0)
if(istype(Target,/mob/monsters/))
if(Target.transformable && Target.transformlevel != 4)
Target.Monster_Transform()


Second Code
        Monster_Transform()
if(src.powerlevel <= 0)
if(!src.transformlevel)
src.powerlevel = src.maxpowerlevel
if(src.icon == 'Frieza_1.dmi') src.icon = 'Frieza_2.dmi'
if(src.name == "Cell") src.icon = 'Bio_Android_2.dmi'
if(src.name == "Cooler") src.icon = 'Cooler_2.dmi'
src.transformlevel = 1
src.Add_Aura("Transform")
src.maxpowerlevel += 1000000
src.strength += 30
src.defense += 35
src.kipower += 20
if(src.transformlevel == 1)
src.powerlevel = src.maxpowerlevel
if(src.name == "Frieza") src.icon = 'Frieza_3.dmi'
if(src.name == "Cell")
src.icon = 'Bio_Android_3.dmi'
src.overlays += 'Bio_Android_Features_3.dmi'
if(src.name == "Cooler") src.icon = 'Cooler_3.dmi'
src.transformlevel = 2
src.overlays += 'Elec_1.dmi'
src.maxpowerlevel += 1500000
src.strength += 40
src.defense += 45
src.kipower += 30
if(src.transformlevel == 2)
src.powerlevel = src.maxpowerlevel
if(src.name == "Frieza") src.icon = 'Frieza_4.dmi'
if(src.name == "Cell") src.icon = 'Bio_Android_4.dmi'
if(src.name == "Cooler") src.icon = 'Cooler_4.dmi'
src.transformlevel = 3
src.maxpowerlevel += 3000000
src.strength += 65
src.defense += 60
src.kipower += 45
if(src.transformlevel == 3)
src.powerlevel = src.maxpowerlevel
if(src.name == "Cooler")
src.icon = 'Cooler_5.dmi'
src.maxpowerlevel += 3000000
src.transformlevel = 4
src.powerlevel += 4500000
src.strength += 80
src.defense += 75
src.kipower += 60
src.level += 10


Monster`s names are same and i make them transformable, but still once i kill them they won`t transform, just die.

I didn't read the whole thing but I expect that this line is the problem...
if(Target.powerlevel <= 0)


I think you mean.

if(Target.powerlevel >= 0)


If that's not the problem I suggest you output to the world every time an if statement checks, like so
mob
proc
DeathCheck(mob/Target)
if(Target.powerlevel <= 0)
world<<"power-level checked"
if(istype(Target,/mob/monsters/))
world<<"is monster"
if(Target.transformable && Target.transformlevel != 4)
world<<"is transformable
Target.Monster_Transform()


This way you get a message whenever a check passes, if you don't get the message that means you know where the check failed.
In response to Froggersucks
Froggersucks wrote:
I didn't read the whole thing but I expect that this line is the problem...
> if(Target.powerlevel <= 0)
>

I think you mean.

> if(Target.powerlevel >= 0)
>

If that's not the problem I suggest you output to the world every time an if statement checks, like so
> mob
> proc
> DeathCheck(mob/Target)
> if(Target.powerlevel <= 0)
> world<<"power-level checked"
> if(istype(Target,/mob/monsters/))
> world<<"is monster"
> if(Target.transformable && Target.transformlevel != 4)
> world<<"is transformable
> Target.Monster_Transform()
>

This way you get a message whenever a check passes, if you don't get the message that means you know where the check failed.


i yust need to put return so monster didnt die
                    if(Target.transformable && Target.transformlevel != 4)
src.Monster_Transform(Target)
return<----


Tnx for halping anyway