UE3 - UT3 How to add weapons for a pawn

  • Two Factor Authentication is now available on BeyondUnreal Forums. To configure it, visit your Profile and look for the "Two Step Verification" option on the left side. We can send codes via email (may be slower) or you can set up any TOTP Authenticator app on your phone (Authy, Google Authenticator, etc) to deliver codes. It is highly recommended that you configure this to keep your account safe.

wwwRAELorg

Intelligent Design Atheist
Jul 26, 2009
37
0
0
www.rael.org
I'm trying to programming my inherited pawn class to have the impact hammer and translocator with infinite ammo. So far my code appears as such:

Code:
	local AIController AIC;
	local Weapon ImpactHammer, Translocator;

        foreach DynamicActors( class'AIController', AIC )
        {
		ImpactHammer = Spawn(class'UTWeap_ImpactHammer');
		ImpactHammer.Instigator=AIC.Pawn;
		//ImpactHammer.BecomeItem();
		ImpactHammer.AddAmmo(1000);
		AIC.Pawn.InvManager.AddInventory(ImpactHammer);
	}

What do I need to code to have the enemy (inherited) pawns to have those weapons? Am I on the right track? How do I make these weapons invisible (The enemy are supposed to have this ability without weapons)? Thank you for any help.