Jump to content

Problem with getting NVSE to work in GECK scripts


ozziefire

Recommended Posts

I have all the latest updates working ok, I have latest GECK powerup and have put the NVSE plugin in but can't seem to get the NVSE commands to work in a script, I just get syntax errors, I am trying to script shotguns to change spread and projectiles depending on the rounds loaded, this is an effect script put into the shotgun.

 

ScriptName 0ShotgunRoundEFFECTScript

ref refOwner
ref refWeapon
ref refAmmo
short intNumProj
short indBallDamage
float floatSpreadMult
float floatCritDamage

Begin ScriptEffectStart

Set refOwner to GetContainer
Set refWeapon to refOwner.GetSelf
refWeapon.GetWeaponAmmo refAmmo

If refAmmo == "Ammo20GaSlug"
	Set intNumProj to 1
	Set floatSpreadMult to 1
	Set floatCritDamage to 7
EndIf
If refAmmo == "Ammo20Ga"
	Set intNumProj to 6
	Set floatSpreadMult to 1.4
	Set floatCritDamage to 2
EndIf

refWeapon.SetWeaponNumProjectiles intNumProj
refWeapon.SetWeaponMinSpread floatSpreadMult
refWeapon.SetWeaponCritDamage floatCritDamage

End

Edited by ozziefire
Link to comment
Share on other sites

Are you loading up the geck in the way you're told to: ie, using the "-editor" tag with the nvse loader?

 

As a side note though, you can change all those effects just by changing the ammo properties, no need to script anything. Just look at how it's done for existing ammo, ie, Slug vs Buckshot.

Link to comment
Share on other sites

Are you loading up the geck in the way you're told to: ie, using the "-editor" tag with the nvse loader?

 

As a side note though, you can change all those effects just by changing the ammo properties, no need to script anything. Just look at how it's done for existing ammo, ie, Slug vs Buckshot.

Doh, Doh, thanks mate, that was the problem, I really should read instructions more thoroughly, I had found where to change spread etc but even creating a new ammo effect to actually change the number of projectiles or critical chance doesn't seem to be an option, and number of projectiles is a pretty intergral part of shotgun rounds functioning to some degree of realism, unfortunately this means NVSE is required to use my mod if it works as I want it :)

 

Edit: damnit I just found Projectiles Per Shot in the Ammo itself :)

Edited by ozziefire
Link to comment
Share on other sites

  • Recently Browsing   0 members

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