
Note I havent actually done this with more than one player, I just set the game mode and went in alone.
Here is how I gave the players TIDs to implement this and other things, which I believe is standard ZDOOM protocol:
Code: Select all
SCRIPT 256 ENTER
{
// Assign each player a TID.
Thing_ChangeTID(0, 1000 + PlayerNumber());
}
Code: Select all
SCRIPT 331 ENTER // Rolling health for each player
{
if (health_gain[PlayerNumber()] > 0)
{
GiveActorInventory(PlayerNumber()+1000, "HealthBonus", 1);
health_gain[0] --;
}
//gives an interval between recovery. Length depends on difficulty.
delay(recover_2);
restart;
}

Also on cooperative when I die and ressurrect all my custom weapons are taken away and my ammo is stripped to zero. I dont think picking up ammo gives me more, either. Weird.

EDIT: On inspection of the console in deathmatch mode the scripts that keep looping for each player are terminated as "runaway scripts." Gah, I hate when that happens. Any suggestions?