Moraelin Posted August 1, 2015 Share Posted August 1, 2015 Well, it only has a script since like an hour ago :p Link to comment Share on other sites More sharing options...
devinpatterson Posted August 1, 2015 Share Posted August 1, 2015 Hmm... the idea definitely has merit, but I'm not sure how I'd detect if a weapon is a shotgun. The only difference is that by default they're set to fire more than one projectile at a time, and I'm not sure one can test that in a perk.This may very well be a dead end, but there's a NVSE function for you could use to test against, GetWeaponNumProjectiles. I'm not sure you could do it as a condition on a perk directly, ie ?? == 7 (I think all shotgun projectiles are 7) but you could have a running quest script with a updated var from that function and tie the perk to that var; If GetWeaponNumProjectiles == 7 Set sShotgun to 1 Else Set sShotgun to 0 and then have the perk condition GetScriptVariable == 1 (ie sShotgun) Link to comment Share on other sites More sharing options...
Moraelin Posted August 1, 2015 Share Posted August 1, 2015 Hmm... can I use those conditions in perks, though? Because currently I can't seem to use even all vanilla functions there. I can't seem to check the ammo type. I'd rather not have a long running script, if I can avoid it. Link to comment Share on other sites More sharing options...
devinpatterson Posted August 1, 2015 Share Posted August 1, 2015 Hmm... can I use those conditions in perks, though? You shouldn't have any problem using GetScriptVariable just select it in the conditions, it's a vanilla function (not NVSE) I believe it's used in a few different perks. Your Because currently I can't seem to use even all vanilla functions there. I can't seem to check the ammo type.Huh, that's weird, yeah I don't have any insight there I'd rather not have a long running script, if I can avoid it.I wouldn't say it's long (and although it's continuously running it's so simple there won't be any impact on CPU cycles), your just creating and updating a var for the condition check. Say something like; Scn ShotgunSurgeonPerkScript short sShotgun Begin Gamemode If (player.GetNumProj) == 7 ;format (int) ref.GetNumProj item:ref. Not sure if what I typed is the correct format Set sShotgun to 1 Else Set sShotgun to 0 End and then set the quest to update as often as you feel it needs to be accurate (say 1/10 of a second?). It's just a way for the perk to latch on to a NVSE function's results (GetWeaponNumProjectiles). But the obvious caveat being I havn't tried it personally & I'm not a scripter, however I think it's sound in theory. Link to comment Share on other sites More sharing options...
Moraelin Posted August 1, 2015 Share Posted August 1, 2015 Well, one further problem is that ammo doesn't always have 7 pellets. The 3/0 ammo from GRA shoots 3, and the sawn off shotgun shoots 14. If I allow 3, then the three-beam laser for example qualifies too. Which, come to think of it, wouldn't be all that horrible, Link to comment Share on other sites More sharing options...
devinpatterson Posted August 1, 2015 Share Posted August 1, 2015 Also if getting the script var is a pain, you can have the script set a global value and just use the condition on the perk to test against that glob var. There's two functions in NVSE for settings globs (SetGlobalVariable & SetGlobalValue). Anyway a few options for you to explore. Link to comment Share on other sites More sharing options...
devinpatterson Posted August 1, 2015 Share Posted August 1, 2015 Well, one further problem is that ammo doesn't always have 7 pellets. The 3/0 ammo from GRA shoots 3, and the sawn off shotgun shoots 14. If I allow 3, then the three-beam laser for example qualifies too. Which, come to think of it, wouldn't be all that horrible, Yeah, you could do => 3. I'm not sure on filtering out the tri beam, it seems like there should be something to check against in the script, maybe just the GetEquipped function != tribeam base id if it's the only other weapon with multiple projectiles that's not a shotgun. Link to comment Share on other sites More sharing options...
Thenryb Posted August 1, 2015 Share Posted August 1, 2015 Well, one further problem is that ammo doesn't always have 7 pellets. The 3/0 ammo from GRA shoots 3, and the sawn off shotgun shoots 14. If I allow 3, then the three-beam laser for example qualifies too. Which, come to think of it, wouldn't be all that horrible,Yeah, the tri-beam and multiplas are shotgun-type weapons aren't they? Link to comment Share on other sites More sharing options...
Recommended Posts