Stay Connected |
GUNetwork
|
Latest topics | » Here Are Some Of The Best Mods From GunNetwork
by Sinister_Is_Random Sat Aug 31, 2024 2:38 am
» Saying hi after two years
by spiralsandspirals Thu Aug 29, 2024 12:39 am
» Weird bug or glitch with Console Command. [FNV]
by STQayas Sun Aug 25, 2024 1:19 am
» Looking for an alternative to Nexus
by freakoverse Fri Aug 23, 2024 10:50 am
» fallout 4 mods
by salientguitar4 Mon Aug 19, 2024 5:47 pm
» [FNV] How to troubleshot infinite loading issues?
by Abyssfer Wed Aug 14, 2024 5:28 pm
» Fnv Enable player control command
by GenJohnWilliam Mon Aug 05, 2024 9:25 pm
» Problem with Dragbodies NCR overhaul
by Lankychazz2009 Fri Aug 02, 2024 8:53 pm
» NCR Trooper Overhaul Armors with NCR Ultimate Overhaul
by Abyssfer Thu Aug 01, 2024 8:29 pm
» Roland Deschain ist The Mysterious Stranger and other t
by SpaceRanger Mon Jul 22, 2024 10:15 am
» Guns you want in Fallout
by SpaceRanger Mon Jul 22, 2024 9:25 am
» [FO4] Doom 2016 models as replecement.
by SpaceRanger Sun Jul 21, 2024 9:12 am
» [FO4] Secret Service armor, helmet headlamp
by fossaceca17 Sun Jul 21, 2024 4:19 am
» The Legion are fascists, let's discuss it.
by Cipher22 Fri Jul 12, 2024 5:28 am
» The Next fallout
by Cipher22 Fri Jul 12, 2024 5:25 am
» Your favorite mods for F:NV
by Cipher22 Fri Jul 12, 2024 5:21 am
» Afterlife discord
by Willaemann Tue Jul 09, 2024 7:44 pm
» What happened to Outlawer's pack 1?
by Trappy82 Mon Jun 17, 2024 6:17 am
» Greetings
by septron Fri Jun 14, 2024 2:49 pm
» Starfield
by jaypak Mon Jun 10, 2024 9:56 am
|
September 2024 | Mon | Tue | Wed | Thu | Fri | Sat | Sun |
---|
| | | | | | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | 27 | 28 | 29 | 30 | | | | | | | Calendar |
|
September 2024 | Mon | Tue | Wed | Thu | Fri | Sat | Sun |
---|
| | | | | | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | 27 | 28 | 29 | 30 | | | | | | | Calendar |
|
| Changing Clip Size Code | Author | Message |
---|
Gray Wolf
![Gray Wolf](https://2img.net/u/3411/25/04/32/avatars/3930-40.png)
Posts : 23 Join date : 2015-01-16 Location : USA
![Changing Clip Size Code Empty](https://2img.net/i/fa/empty.gif) | Subject: Changing Clip Size Code Sat Jul 04, 2015 11:24 pm | |
| I've looked but can't find anything anywhere, and from the research I've done, I don't know how to implement the code I do know. I want to make a custom ammolist (easy), where if one type of ammo is chosen, there will be a clip size of ten, whereas if another type is chosen, the projectile, damage, sound, and clip size is changed. Anyone have any ideas on this? Thanks. |
| ![Go down](https://2img.net/i/empty.gif) | | Guest Guest ![avatar](https://images2.imgbox.com/84/51/a4fXcZIj_o.png)
![Changing Clip Size Code Empty](https://2img.net/i/fa/empty.gif) | Subject: Re: Changing Clip Size Code Sun Jul 05, 2015 12:47 am | |
| Assuming you mean multiple variations of the same weapon (your post is somewhat vague in that regard) that each fire different kinds of projectiles, its fairly easy to do.
Using a 10mm pistol as an example, you would need to create:
10mm Pistol 'Master' weapon (this is the item you'd loot and select in your inventory) 10mmPistolSA (standard ammo) 10mmPistolIA (incendiary ammo) 10mmPistolEA (explosive ammo)
You would script the Master weapon so that selecting/equipping it brings up a list, allowing you to choose which version of the 10mm Pistol you want to use. Choosing one of the ammo types adds that weapon to your inventory with the player.additem command.
And because each 'ammo type' is actually a standalone weapon in the GECK/plugin, you could make those weapons as distinct as you want. Model/texture, projectile type, ammo capacity, etc. |
| ![Go down](https://2img.net/i/empty.gif) | | Gray Wolf
![Gray Wolf](https://2img.net/u/3411/25/04/32/avatars/3930-40.png)
Posts : 23 Join date : 2015-01-16 Location : USA
![Changing Clip Size Code Empty](https://2img.net/i/fa/empty.gif) | Subject: Re: Changing Clip Size Code Sun Jul 05, 2015 10:08 pm | |
| Hey Tes. Nice avatar too! Ha ha! Thanks for the response. Sorry for the lack of detail at the time. It was really late and I was about to pass out. What I am working on is a pistol with an underbarrel shotgun. By pressing UP on the D-Pad (or 2 if using a keyboard), one can switch the type of ammo they are using for a gun. I have that part figured out, so that the ammo available is either 10mm or 12ga. Now, using the script functions "GetWeaponAmmo", "GetWeaponAmmoUse", "GetWeaponClipRounds", and/or "SetWeaponClipRounds", I'd like to make it so that when using the 10mm ammo, the clip size is 15, but when using the 12ga shells, it's only 1. I've never used those functions before, and haven't been able to find an example of how they are used. Hope that helps. EDIT: Ok, so I figured it out finally in order to be more productive. However, I'm still having trouble with the code (see below). When on the default ammo (9mm), I start with 10 rounds in a ten round magazine. I'll fire three shots, leaving me with 7 rounds left in the magazine. I switch to the shotgun ammo and the magazine capacity changes to 1. I fire one shot and then reload. Then I'll switch back to the 9mm ammo, and the magazine capacity changes back to 10. So far so good. Now, when I switch back to the 9mm ammo, there is only one round in the magazine from when it was using the shotgun ammo. I have to reload like normal in order to refill the magazine. What is supposed to happen is that after the magazine capacity changes back to 10, the magazine should be reloaded back to the 7 rounds that were left over from before switching to the shotgun shells. This is the last part of this stage in the mod before I move on to changing other values (damage done, projectile used, firing sound, etc.) the same way. - Code:
-
scn GunScript
ref Gun ref GunAmmoType
int CurrentAmmoLevel int NewAmmoLevel
Begin GameMode
let Gun := Player.GetEquippedObject 5 let GunAmmoType := GetPlayerCurrentAmmo
set NewAmmoLevel to 1
if Gun == DoublePistol if GunAmmoType == Ammo9mm SetWeaponClipRounds 10 DoublePistol ;Set Magazine Capacity to 10. if NewAmmoLevel == 0 SetPlayerCurrentAmmoRounds CurrentAmmoLevel ;Set Ammo Level to CurrentAmmoLevel. set NewAmmoLevel to 1 EndIf
set CurrentAmmoLevel to GetPlayerCurrentAmmoRounds ;Set CurrentAmmoLevel to current ammo level. else SetWeaponClipRounds 1 DoublePistol ;Set Magazine Capacity to 1. set NewAmmoLevel to 0 EndIf
EndIf
END
|
| ![Go down](https://2img.net/i/empty.gif) | | Sponsored content
![Changing Clip Size Code Empty](https://2img.net/i/fa/empty.gif) | Subject: Re: Changing Clip Size Code ![Changing Clip Size Code Empty](https://2img.net/i/empty.gif) | |
| |
| ![Go down](https://2img.net/i/empty.gif) | | |
Similar topics | ![+](https://2img.net/i/empty.gif) |
|
| Permissions in this forum: | You cannot reply to topics in this forum
| |
| |
| |