First time with NVSE/FOSE scripting

Post » Sun Feb 06, 2011 4:31 pm

I'm trying to fix the issue with the Gatling Laser with CF Frame mod doubling in weight when equipped and though I don't think this will solve the issue now that I've noticed having two gatling lasers in one's inventory fixes the issue for some reason and somehow the item is showing the correct weight but equipping is adding a second invisible weapon somehow, anyway, this script just to test if I can change the weight of the gatling lasers I pick up at all via quest script doesn't do anything as it stands, with NVSE GetWeight and SetWeight functions:

scn gatlinglaserweightfixscriptFloat WeightBegin GameMode	set Weight to WeapGatlingLaser.GetWeight	If  Weight == 18		set Weight to 9		WeapGatlingLaser.SetWeight Weightendifend

User avatar
lauren cleaves
 
Posts: 3307
Joined: Tue Aug 15, 2006 8:35 am

Post » Sun Feb 06, 2011 11:47 am

The X.Function notation only works on references. WeapGatlingLaser is a base form, so you need to pass it as an parameter, like GetWeight WeapGatlingLaser. Same for SetWeight, you need to pass it the base form as a second parameter.
User avatar
Anna Kyselova
 
Posts: 3431
Joined: Sun Apr 01, 2007 9:42 am

Post » Sun Feb 06, 2011 5:39 pm

The X.Function notation only works on references. WeapGatlingLaser is a base form, so you need to pass it as an parameter, like GetWeight WeapGatlingLaser. Same for SetWeight, you need to pass it the base form as a second parameter.


Um, thanks but I don't understand a single word of that. What's X.Function? References? Base Form? Parameter? Second Parameter? No need to answer as I'm sure you have better things to do. I'm just saying.

BM
User avatar
Wayland Neace
 
Posts: 3430
Joined: Sat Aug 11, 2007 9:01 am

Post » Sun Feb 06, 2011 12:50 pm

X.Function as in WeapGatlingLaser(x).GetWeight(function).
Also seriously, parameters are not a xSE scripting thing, and neither are references and base forms. Perhaps you should read up on the basics before trying to use NVSE.
E: It's a bit much to say you don't know what a parameter is when there's an example of one in the sentence I mention parameters. Even if you haven't read a thing on the wiki you should be able to figure that out easily.
User avatar
Taylor Tifany
 
Posts: 3555
Joined: Sun Jun 25, 2006 7:22 am


Return to Fallout: New Vegas