Originally posted by RattleSN4K3
View Post

/** * Basic ammo factory to spawn in the level on runtime */ class XAmmoAddFactory extends UTAmmoPickupFactory; DefaultProperties { // allow dynamic spawn bStatic=false bNoDelete=false // allow basing on moveable actors (such as lifts) bMovable=true AmmoPickupClass=class'UTAmmo_ShockRifle' // replicate initial rotation bNetInitialRotation=true bNeverReplicateRotation=false // just set is for safety // replicate all other props (not only the 'hidden' flag) bOnlyReplicateHidden=false }
/** * Mutator to initialize the map profile containing the locations * for the new ammo factories */ class XAmmoAddMutator extends UTMutator; var class<PickupFactory> AmmoFactoryClass; function PostBeginPlay() { super.PostBeginPlay(); LoadAmmo(); } function LoadAmmo(optional string ProfileName = "") { local XAmmoAddLocationInfo LocInfo; if (class'XAmmoAddLocationInfo'.static.Exists(LocInfo, ProfileName)) { LocInfo.RestoreFactories(AmmoFactoryClass); } } Defaultproperties { AmmoFactoryClass=class'XAmmoAddFactory' }
Leave a comment: