redeyesandlonghair Posted January 18, 2012 Share Posted January 18, 2012 so this specific part of my script is failing, and a lot of other stuff depends on this part working. it's pretty simple, so I'm not sure why it's not working. there is more to the script, but I'm posting just the part that's not working. If you think you need the whole script to figure out what's wrong, lemme know float fEnergy begin GameMode set fEnergy to player.getav Endurance end For some reason, this is setting fEnergy to 0. This is the only time in the script that fEnergy's value is being changed. Link to comment Share on other sites More sharing options...
Skevitj Posted January 18, 2012 Share Posted January 18, 2012 off the top of my head guess: It wants an int instead of a float? Link to comment Share on other sites More sharing options...
redeyesandlonghair Posted January 18, 2012 Author Share Posted January 18, 2012 (edited) off the top of my head guess: It wants an int instead of a float? will try, thanks for the tip edit: nope, it stubbornly remains at 0 Edited January 18, 2012 by redeyesandlonghair Link to comment Share on other sites More sharing options...
AlfredTetzlaff Posted January 18, 2012 Share Posted January 18, 2012 Hi, please try short instead of float (I've seen this type in some example scripts regarding Actor Values)Hope this helps, happy modding :thumbsup: Link to comment Share on other sites More sharing options...
caramellcube Posted January 18, 2012 Share Posted January 18, 2012 try this and see if it's still reading as 0... float fEnergy begin GameMode set fEnergy to 10 end if it is, then the problem must be somewhere else in the script.Oh, also this is probably nothing but I take it you're not trying to read fEnergy outside this script? Link to comment Share on other sites More sharing options...
Xepha537 Posted January 18, 2012 Share Posted January 18, 2012 Like caramellcube says, if you're attempting to access fEnergy from outside of the script, you won't get the value set by it. You should use a Global if you need access from other scripts. To test you could use the FOSE command printc to spit the variable out into the console, like so: set fEnergy to player.getav Enduranceprintc "fEnergy : %.0f" fEnergy Link to comment Share on other sites More sharing options...
redeyesandlonghair Posted January 18, 2012 Author Share Posted January 18, 2012 (edited) try this and see if it's still reading as 0... float fEnergy begin GameMode set fEnergy to 10 end if it is, then the problem must be somewhere else in the script.Oh, also this is probably nothing but I take it you're not trying to read fEnergy outside this script? Like caramellcube says, if you're attempting to access fEnergy from outside of the script, you won't get the value set by it. You should use a Global if you need access from other scripts. To test you could use the FOSE command printc to spit the variable out into the console, like so: set fEnergy to player.getav Enduranceprintc "fEnergy : %.0f" fEnergy I'm only trying to use the variable within the script itself. I was allready doing the thing where it shows the variable in the console, that's how I know it was staying at 0. Thank you for all the information :) EDIT: so apparently, even tough the game will not reduce your SPECIALs to 0 when you look at them in the pipboy... if you have a natural Endurance of 1 and an effect that lowers Endurance by 1, the game will return a value of 0 if you use getav. Problem solved :laugh: Edited January 18, 2012 by redeyesandlonghair Link to comment Share on other sites More sharing options...
REZ01 Posted January 18, 2012 Share Posted January 18, 2012 Not sure If you got this fixed yet.. If your doing what I think your trying to .. You can use player.getav EnduranceCondition, Then run a Calculation off your Base.. That way you will be able to handle the actual amount needed to add or subtract without effects present. I think thats the way I used to do it.. been awhile.. Link to comment Share on other sites More sharing options...
Recommended Posts