RhalexDoesMods Posted January 2, 2018 Share Posted January 2, 2018 (edited) I've made a tiny script that should increase the player's Big Guns skill when they equip a certain gun, like the Minigun. Scn ErinMinigunScript short previous short restoreg Begin onEquip showmessage eringun1MSG set previous to Player.GetAV BigGuns Player.RestoreAV BigGuns 100 PrintToConsole "%a" previous set restoreg to ( previous - Player.GetAV BigGuns) End Begin onUnequip Player.DamageAV BigGuns restoreg End Checked the code with the Cipscis site, and it's all well and good, until I launch the game. The script doesn't work. The PrintToConsole just spits out a 0 every time, the RestoreValue doesn't do jack s***, and I've already switched out RestoreAV/DamageAV with ModAV, SetAV, and ForceAV and still nothing. Edited January 2, 2018 by RhalexDoesMods Link to comment Share on other sites More sharing options...
Mktavish Posted January 3, 2018 Share Posted January 3, 2018 Hmmm I'm a little unclear with how your script is executing , but you seem to have an indepth understanding with it. So before I try to re-write your execution of it to my understanding. Just try replacing all uses of " Player. " with " PlayerRef. " Link to comment Share on other sites More sharing options...
skittered Posted January 3, 2018 Share Posted January 3, 2018 (edited) ... was your skill at least being changed to 100 using ForceAV or ModAV ? .. your console command is incorrect .. the %a won't print anything as it's a specific fose variable meant to print something specific passed to it, something to do with ascii code .. .. use %g edit ..(deleted)( blah, too much for one post prior to knowing more details ) Edited January 3, 2018 by skittered Link to comment Share on other sites More sharing options...
RhalexDoesMods Posted January 4, 2018 Author Share Posted January 4, 2018 ... was your skill at least being changed to 100 using ForceAV or ModAV ? .. your console command is incorrect .. the %a won't print anything as it's a specific fose variable meant to print something specific passed to it, something to do with ascii code .. .. use %g edit ..(deleted)( blah, too much for one post prior to knowing more details ) Where can I know more on what variables I can use to print things to the console? This one worked perfectly. Hmmm I'm a little unclear with how your script is executing , but you seem to have an indepth understanding with it. So before I try to re-write your execution of it to my understanding. Just try replacing all uses of " Player. " with " PlayerRef. "Tried it, and it worked! So, I replaced the variable from %a to %g, and now the console prints out the previous value of the Big Guns skill, and now as I unequip the Minigun, it reverts my skill back to what it was! Thank you, guys! Link to comment Share on other sites More sharing options...
skittered Posted January 4, 2018 Share Posted January 4, 2018 Here for one .. http://geck.bethsoft.com/index.php?title=String_Formatting .. and there's a whole host of other places you can find useful information if you search for it. Glad it's working. Link to comment Share on other sites More sharing options...
Recommended Posts