Inventory tossable?
Inventory tossable?
Is there any method to decide if an inventory is tossable? (Worst case would be using a white- or blacklist.)
"If Origin not in center it be not in center." --Buggie
Re: Inventory tossable?
In the base Inventory class, no.
Pickup class also no.
Weapon class has bCanThrow.
What are you trying to do?
Pickup class also no.
Weapon class has bCanThrow.
What are you trying to do?
Signature goes here.
Re: Inventory tossable?
Players should be able to toss some inventory things like Scuba or Flashlight. Also they should drop some (random) inventory items on death.
"If Origin not in center it be not in center." --Buggie
Re: Inventory tossable?
Thanks, but that mutator drops everything that is not Ammo. (For example I realized personal light as an inventory item and that should never be dropped.)
"If Origin not in center it be not in center." --Buggie
- EvilGrins
- Godlike
- Posts: 9803
- Joined: Thu Jun 30, 2011 8:12 pm
- Personal rank: God of Fudge
- Location: Palo Alto, CA
- Contact:
Re: Inventory tossable?
True, pinata doesn't drop ammo... but every weapon it does drop has as much ammo in it that it had when it was still held.
http://unreal-games.livejournal.com/
Smilies · viewtopic.php?f=8&t=13758medor wrote:Replace Skaarj with EvilGrins
Re: Inventory tossable?
Are you talking about a drop on death sort of thing or a drop with KeyBind sort of thing?
Looks like both, if you can give us a full detailed explanation of what you want then we would be better able to assist.
Looks like both, if you can give us a full detailed explanation of what you want then we would be better able to assist.
Signature goes here.
Re: Inventory tossable?
Thanks for all comments. I'll try with a blacklist:
FIX: changed "(string(Inv.Class.Outer) $ "." $ String(Inv.Class))" to "String(Inv.Class)"
Code: Select all
var config string NoneTossableInventory[8]; // format: <Packagename.classname>, e.g. "Botpack.Pulsegun" (I've chosen "string", because the outer name may contain illegal name characters)
function bool InventoryIsTossable(Inventory Inv) {
local byte i;
if (Weapon(Inv) != None)
return Weapon(Inv).bCanThrow;
if (Ammo(Inv) != None)
return false;
for (i = 0; i < ArrayCount(NoneTossableInventory); i++)
if (NoneTossableInventory[i] != "" )
if (NoneTossableInventory[i] ~= String(Inv.Class))
return false;
return true;
}
"If Origin not in center it be not in center." --Buggie