SphereCommunity
Limitation to Dead People - Printable Version

+- SphereCommunity (https://forum.spherecommunity.net)
+-- Forum: Sphere 0.56d (/Forum-Sphere-0-56d)
+--- Forum: Script Requests (/Forum-Script-Requests)
+--- Thread: Limitation to Dead People (/Thread-Limitation-to-Dead-People)



Limitation to Dead People - backtobasics - 01-31-2013 05:07 PM

Hi there!

I just wonder if it is possible to prevent dead people from seeing some kind of npcs? For instance, if a player is dead, he wont be able to see a dragon of an id c_dragon_green even its standing near him.

Thanks for your help in advance,
basics.


RE: Limitation to Dead People - WRWR - 02-05-2013 08:38 AM

USE @CLICK and REMOVEFROMVIEW


RE: Limitation to Dead People - backtobasics - 02-06-2013 03:26 AM

so, should it be like that

on=@click
if (<src.hits>=0) // if the player is a ghost (or this could be a body check)
removefromview // dont show the npc
endif

is that ok?

I think using @environchange is more useful isnt it?


RE: Limitation to Dead People - darksun84 - 02-06-2013 03:43 AM

in the wiki it's written that removefromview remove the item/char for all nearby clients :\


RE: Limitation to Dead People - Seron - 02-06-2013 07:32 PM

[FUNCTION SingleRemoveFromView]
SENDPACKET 01d D<ARGS>

You can use this function for single-player removefromview...
Example:

on=@click
src.singleremovefromview <uid>

Will remove <default> from <src> view


RE: Limitation to Dead People - backtobasics - 02-10-2013 03:49 PM

Could you give an example with a npc id so I can clearly understand?


RE: Limitation to Dead People - Mordaunt - 02-10-2013 04:14 PM

You don't need an NPC id, the <uid> is triggered under the @click so it will automatically fill in said creature, if you re wanting to limit it to certain types simply do:

Code:
ON=@Click
if <body>==0D0  //chicken
   src.singleremovefromview <uid>
endif