# UDK : UTWeap_RocketLauncher gift CreateInventory: Any idea why this does not work properly?

I am giving the player an instanced class of UTWeap_RocketLauncher in an instance of UTGame.

PlayerPawn.CreateInventory(class'FobikRocketLauncher',false); // Does not work


Even if I give the original class (eg. UTWeap_RocketLauncher) it does not actually show up. However if I do a "GiveWeapons" cheat, I get it just fine. It also works if I had code it into the map. - But UTWeap_LinkGun works fine either way.

Any ideas? It shows the default ammo amount, and the icon on the HUD.

• You might want to use UDK Forum for your question. – Quazi Irfan Nov 26 '11 at 12:41

By the GiveWeapons cheat, I'm guessing you mean the AllWeapons cheat?
AllWeapons gives the player the UTGameContent.UTWeap_RocketLauncher_Content weapon, which is a subclass of UTGame.UTWeap_RocketLauncher that references all the rocket launcher art assets.
So, you'll need to either make FobikRocketLauncher "extend" UTWeap_RocketLauncher_Content or copy all the art asset references in UTWeap_RocketLauncher_Content into FobikRocketLauncher.
And the reason the Link Gun works is that it has no such subclass -- UTGame.UTWeap_LinkGun has all the link gun art asset references in it.