Page 1 of 1

Healing Players... How?

Posted: Tue May 19, 2009 11:23 am
by Logan MTM
Hi everyone!

Code: Select all

Script 700 ENTER
{
Delay(35); 
If (CheckInventory("Health") > 0)
 {
 GiveInventory("Health",1);
 }
 Restart;
}
The code above work fine in SP mode, how to make it work in MultiPlayer? ^^'

I meant, heal all players in game.

Re: Healing Players... How?

Posted: Tue May 19, 2009 3:22 pm
by Remmirath
Try with NET ENTER.

Re: Healing Players... How?

Posted: Tue May 19, 2009 5:16 pm
by Xaser
Actually, the 'net' keyword would come after ENTER, and all it does is flag scripts as "pukable" and really isn't useful unless it's set up as an alias in KEYCONF. Not the case here.

Ideally, as an ENTER script, shouldn't this work as-is? A copy of it is executed for each player on the map, so I'd imagine that each player would have their own cycling health script. Not sure what the issue is here.

Otherwise you can use an ENTER script to assign players TIDs (using [wiki]playernumber[/wiki]), then have a looping OPEN script that uses HealThing on them.

Re: Healing Players... How?

Posted: Tue May 19, 2009 6:38 pm
by edward850
use HealThing(1); instead. (1 being the value of how much health to give.)
You may want to add a respawn script for when a player... respawns.

Re: Healing Players... How?

Posted: Tue May 19, 2009 8:49 pm
by Macil
That script should already work as it is. Nothing needs changing.

(Making it a ENTER NET script would be incorrect because then players could start the script multiple times for themself, and make their health charge faster.)
(You don't need a RESPAWN script because ENTER scripts do NOT stop when the player dies. They only stop once the player has left the game.)

Re: Healing Players... How?

Posted: Fri May 22, 2009 8:19 am
by Logan MTM
Solve. Thank you guys! :D