ID:150197
 
I have the reviving and teleporting to death and I've fixxed all that mostly by myslef however....I need help with something. When you get revived, how could you get at full health. In my game, you touch and star to go back to the world. When the die...they're like....0/299 but I want them to come back in full health.

Teleporter1
icon = 'Teleport.dmi'
icon_state = "1"
Teleporter1/Enter()
usr.Move(locate(1,1,1))
usr.MAXHP(Or something like that.)

Normally, they just go back to the start with -something HP and die right away. Can anyone help me?

-Sajai
It looks like you do have a Maxhp var so add this code:

src.hp=src.Maxhp
In response to Nadrew
Nadrew wrote:
It looks like you do have a Maxhp var so add this code:

> src.hp=src.Maxhp
>



Teleporter1
icon = 'Teleport.dmi'
icon_state = "1"
Teleporter1/Enter()
usr.Move(locate(1,1,1))
src.HP=src.MAXHP


It says HP and MAXHP are bad vars when I'm 100% sure they're not.
In response to Sajai
Teleporter1
icon='blah.dmi'
Enter(mob/M)
M.loc=locate(x,y,z)
M.HP=M.MAXHP


You need to learn how to use proper indentation.
In response to Nadrew
Nadrew wrote:
> Teleporter1
> icon='blah.dmi'
> Enter(mob/M)
> M.loc=locate(x,y,z)
> M.HP=M.MAXHP
>

You need to learn how to use proper indentation.


89 errors....I fixed em all and now I have 57 errors.......
In response to Sajai
Make it a turf that was a snippet.
In response to Nadrew
Nadrew wrote:
Make it a turf that was a snippet.


191 errors and 3 warnings. This isn't wokring, Nadrew. Could you tell me the code the way I indented it before?
In response to Sajai
turf/teleporter
icon='blah.dmi'
Enter(mob/M)
..()
M.loc=locate(x,y,z)
M.HP=M.MAXHP


And don't copy paste it.
In response to Nadrew
Nadrew wrote:
> turf/teleporter
> icon='blah.dmi'
> Enter(mob/M)
> ..()
> M.loc=locate(x,y,z)
> M.HP=M.MAXHP
>

And don't copy paste it.


Thanks! I got it but I had to change the M.HP=M.MAXHP to usr.HP=usr.MAXHP. Thanks Nadrew!