Jump to content

Script not working, somehow?


RhalexDoesMods

Recommended Posts

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 by RhalexDoesMods
Link to comment
Share on other sites

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

... 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 by skittered
Link to comment
Share on other sites

... 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

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...