Team Specific Pick-ups
Team Specific Pick-ups
Is it possible to limit pick-ups to certain teams IE RedTeam is allowed to pick up pistol ammo but BlueTeam is not?
- fr blood
- Frequent Poster Miles card holder
- Posts: 995
- Joined: Wed Mar 06, 2013 4:04 pm
- Location: France
Re: Team Specific Pick-ups
Yes it is, by giving a custom Inventory for a team when the other won't have it, then you'll have to edit the item to check if the player trying to pick it has the inventory or not.
- SwordGrunt
- Forum Regular
- Posts: 377
- Joined: Thu Jun 07, 2012 8:43 pm
Re: Team Specific Pick-ups
Sure. Try this:
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));
}
Re: Team Specific Pick-ups
You Guys are the best thanks!