RhalexDoesMods Posted January 2, 2018 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
Mktavish Posted January 3, 2018 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. "
skittered Posted January 3, 2018 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
RhalexDoesMods Posted January 4, 2018 Author Posted January 4, 2018 On 1/3/2018 at 6:58 PM, skittered said: ... 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. On 1/3/2018 at 5:09 PM, Mktavish said: 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!
skittered Posted January 4, 2018 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.
Recommended Posts