Team Specific Pick-ups
Posted: Sat Apr 16, 2016 5:59 am
Is it possible to limit pick-ups to certain teams IE RedTeam is allowed to pick up pistol ammo but BlueTeam is not?
Leading the way in newschool multiplayer Doom online
https://zandronum.com/forum/
Code: Select all
const int TEAMNUM_BLUE = 0;
const int TEAMNUM_RED = 0;
actor PistolAmmoBlueTeam : CustomInventory
{
+INVENTORY.AUTOACTIVATE
states
{
Spawn:
CLIP A -1
stop
Pickup:
TNT1 A 0 A_JumpIf(ACS_ExecuteWithResult(667) == TEAMNUM_BLUE,"GiveAmmo")
fail
GiveAmmo:
TNT1 A 0 A_GiveInventory("Clip",10)
stop
}
}Code: Select all
#library "TEAMAMMO"
#include "zcommon.acs"
script 667 (void)
{
SetResultValue(GetPlayerInfo(PlayerNumber(),PLAYERINFO_TEAM));
}