ID:164344
 
OK, how do I make an attack code were it is dbl click and if you lose all your health you become a ghoast and you can see you but others can't unlesss there a ghost too.
and you can not attack people if you are a ghost
Let's see:
- For whatever that needs to be double clicked, set up whatever you want [health subtraction and such] with the procedure opf the double click, DblClick()

- Set the persons invisible > 0 and enable sight to see self for ghost

- Remove the attack verb(s) from the ghost person


That's merely ONE way of doing what you were asking for.
In response to GhostAnime
Uhhh can you put that in code for me?
In response to Spartagus
No, because, you see, we're not here to do your work for you.
Spartagus wrote:
OK, how do I make an attack code were it is dbl click and if you lose all your health you become a ghoast and you can see you but others can't unlesss there a ghost too.
and you can not attack people if you are a ghost

So you want to make a "ghost" person when you die. This ghost cannot interact with it's environment but may freely talk with other ghosts. Hmm.

The best way to do this would be to create a new type for the ghost, and then switch mobs upon death. The original mob can be saved in a variable on the ghost mob, if it is later revived.

You could use the invisibility variable to make the ghost invisible, but a better method would be to avoid this variable until you absolutely need it and rely on images for now.

mob
human
icon='icons/mobs/human.dmi'
proc
die()
if(!client) del src //we must have a client to switch mobs, so you'll need to write your own code for NPCs/players that logged out

var/turf/T=loc
loc=null
client.mob=new/mob/ghost(T,src)
verb
attack() //ghosts cannot use this verb, since it's not within their path
...
ghost
density=0
var
image/image
mob/old_mob
proc
revive()
old_mob.loc=loc
client.mob=old_mob
del src
New(loc,mob/old_mob)
.=..()
image=image(icon='icons/mobs/ghost.dmi',loc=src)
if(old_mob)
src.old_mob=old_mob
name=old_mob.name
Login()
.=..()
//upon login, display our icon to every other ghost in the world
for(var/mob/ghost/M in world)
if(client&&!(M.image in client.images)) src<<M.image
M<<image
Logout()
if(client) //in this case, we would be revived
for(var/mob/ghost/M in world)
if(M.image in client.images) client.images-=M.image


-- Data