ZephyrX Posted December 2, 2009 Share Posted December 2, 2009 I'm making a custom weapon, but I'm not sure how to use items that aren't listed as ammo for that purpose. Is there a Form List that I could add an item to and be able to select it as an ammo type? I've heard about using a Form List as the ammo, but that would result in the item itself being launched from the weapon rather than just firing the weapon. Another way to solve this might be to run a script that removes the item when firing, but I can't seem find an applicable blocktype or function that allows that, let alone run before the weapon actually fires to prevent it from shooting without enough ammo. Help? Link to comment Share on other sites More sharing options...
pkleiss Posted December 2, 2009 Share Posted December 2, 2009 I take it you want your custom weapon to use misc items as ammo and not regular bullets, right? Take a look at the Rock-It-Launcher to see how that weapon does it. What's the difference if the items are launched from the weapon and a bullet being launched from the wepon? I don't understand this issue. If its a sound issue, you can choose which sound to play (in the Art and Sound tab) when the gun is activated (fired) so it can still sound like any weapon in the game regarless of what comes out the muzzle. You'll want to make your own form list and add the item(s) you want to use as a ammo to that list. Then you can choose that form list as the ammo type. Link to comment Share on other sites More sharing options...
ZephyrX Posted December 2, 2009 Author Share Posted December 2, 2009 I would do that, but I'm trying to use the existing grenades as ammo and I doubt that their explosions will trigger if fired in that way. I'll try out that method later though and post the results. Link to comment Share on other sites More sharing options...
pkleiss Posted December 3, 2009 Share Posted December 3, 2009 No, they won't explode using that method. There are already several grenade launchers available for dowload on the Nexus. You could look at those to see how they did it, or just use one of those and design something new. I believe you will want to use the GrenadeFragProjectile from the "Projectile" dropdown box on the "Art and Sound" tab of the weapon you are making. Link to comment Share on other sites More sharing options...
ZephyrX Posted December 3, 2009 Author Share Posted December 3, 2009 I checked out the other grenade launcher mods, but most of them seem to add their own ammo type rather than use actual vanilla grenades. I have the weapon working, but I haven't been able to work out the ammo issue, that's all. Link to comment Share on other sites More sharing options...
Antioche Posted December 3, 2009 Share Posted December 3, 2009 The Aliens pulse rifle has a component that loads and fires vanilla grenades. ( Been trying to get it to work with ~non vanilla schematic added~ incindiary grenades myself, no dice ) it seems to load grenades for use, as if running an inventory script. Link to comment Share on other sites More sharing options...
pkleiss Posted December 4, 2009 Share Posted December 4, 2009 The trick is to get the weapon to use the GrenadeFragprojectile so that the projectile will explode like a normal grenade, but not actually shoot out an inventory grenade as these do not explode, but will cause impact damage. Idealy you would want to intercept the gun firing and subtract a grenade from the players inventory, while actually shooting the projectile version of the grenade. How to do this exactly, eludes me. Perhaps an Object Effect that uses a script effect that handles the inventory of grenades might work. But I do not know if a grenade has been loaded into the weapon, it can still be subtracted from the players inventory. Its unclear to me where loaded items are kept for weapons that use items instead of ammo. Link to comment Share on other sites More sharing options...
ZephyrX Posted December 4, 2009 Author Share Posted December 4, 2009 Ah well, guess it's not really worth investigating further seeing that the simple solutions have been exhausted. Thanks to both of you anyway! And pkleiss, I'll take your advice and look for better projects to work on; maybe something in the mod requests forums will be within the scope of my meager skills. :biggrin: Link to comment Share on other sites More sharing options...
ecksile Posted December 4, 2009 Share Posted December 4, 2009 Make a new projectile for the grenade. EDIT*** it is possible i quickly reviewed the ways after my post and pkleiss's way is pretty much the only way to do it that i can see. U would have to do a little a GECK work as well as some scripting but it is possible. Link to comment Share on other sites More sharing options...
Recommended Posts