Jump to content

Changing projectile type based an ammo type


Armok74

Recommended Posts

Is it possible to make a gun changing it's projectile type from special effect based on ammo type list? So player can select projectile type(like flame, beam or missile) just by changing ammo type for weapon.

 

And can I create an effect list and script that can change weapon projectile type if I can't do it just with ammo list in GECK? Or I doomed to create crutches like reequiping different weapons based on ammo list or something like that?

Link to comment
Share on other sites

You can change the projectile that the weapon calls to with ...

"SetWeaponProjectile"

https://geckwiki.com/index.pheaponProjectilep/SetW

 

And of course this need be a unique Base-ID weapon, or it will change all instances of that guns projectile. Unless you want that to happen ?

 

Or there is "SetProjectileTraitNumeric"

https://geckwiki.com/index.php/SetProjectileTraitNumeric

 

Which you would want a unique projectile , or else it would change all uses of that projectile also. Unless you want that?

 

And then the way you see which ammo is used , you would use ...

"GetPlayerCurrentAmmo" https://geckwiki.com/index.php/GetPlayerCurrentAmmo

 

Checking the ref variable against each possible ammo type that gun can use , to then set it to a new projectile , or one or more traits on the projectile.

 

I would suggest a new projectile for each different one , since you will probably want to adjust more than just the type of projectile , therefore less coding needed , and a more efficient script that may be running quite a bit of the time.

Just mention if you need some help setting up the script , but try to be specific in describing the intended outcome.

Also I forget how and where you switch ammo with NV , is it in the pipboy inventory screen?

Because if that is the only place , could make the script run a "Begin MenuMode" block to keep the game impact low.

Link to comment
Share on other sites

...

Also I forget how and where you switch ammo with NV , is it in the pipboy inventory screen?

Because if that is the only place , could make the script run a "Begin MenuMode" block to keep the game impact low.

Switch ammo with either the dedicated "2" hotkey (which rolls through the list of present (count GT 0) and appropriate "caliber for the equipped weapon" ammo), or the Pipboy "Ammo" tab and select from the list. The "second" hotkey is dedicated to that function, but can be switched from the number "<2>" to a different <key>.

 

-Dubious-

Link to comment
Share on other sites

Shameless plug, I made a gun that does exactly this: https://www.nexusmods.com/newvegas/mods/66111

Feel free to dig in the code and take any snippet you want.

 

Maybe shameless ? Hehe ... :teehee:

But also perfect timing for helpfulness ... Looks Awesome by the way :thumbsup:

 

@ dubious Thanks for the clarification :smile:

Link to comment
Share on other sites

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...