• Please make sure you are familiar with the forum rules. You can find them here: https://forums.tripwireinteractive.com/index.php?threads/forum-rules.2334636/

Code Roles without any Ammo at Spawn ?

Witzig

Grizzled Veteran
Jan 16, 2006
2,189
52
Germany
Hi,

I recently though about working on a Close Combat Training Map, since i don't want people to be able to shoot their Weapons on that Map i tried to let them Spawn without any Ammo. I tried setting the Amount in the ROleinfos to 0 but this didn't help. After doing a little bit of reasearch and asking the right people :), i know that i could do that with a Mutator which is included in the Map. Though what i would like to now is, where i'll find the Lines which the Mutator has to override (i don't guess it woud be the Roleinfo Files). Or if it would be easier to simply turn projectile Weapons off for the Map ?

Any help or pointers to any specific URLs would be appreciated :)

Greetz Witzig
 
What you're going to need to do is actually just set it up so that weapons have no ammo.

From what I can tell, ammo isn't allocated from the Roles, but rather in the xxxxWeapon class.

You could easily create extentions of the Kar98 (or whatever weapon), and just set the amount of ammo =0.

So you'd end up with something like htis:

Code:
Kar98TrainingRifleWeapon extends Kar98Weapon;

defaultproperties
{
   InitialNumPrimaryMags=0
}

And everything else would be over ridden (edit: I mean Inheirted here btw..)
This way would allow people to pick up weapon magazines, but they wouldn't start with any.

You would then assign your roles the Kar98TrainingRifleWeapon instead of the Kar98Weapon.
Just wash and repeat for any other weapon you want...
 
Upvote 0