Jump to content

Can someone check this script please


ben446

Recommended Posts

ok so I think ive just wrote my first script. it compiles but I know that don't mean much. The script is placed on an imperial button, and is meant to add a skill level to the player in this case alteration.

 

Scriptname Levelupalteration extends object reference

 

ObjectReference Property Player Auto

 

Event OnActivate (ObjectReference akActionRef)

 

Game.AdvanceSkill("Alteration", 1.0)

 

EndEvent

 

I'm posting this here in the hope someone can check it for me. My Ck has been very buggy lately and don't wanna save and shut down to test the script incase the damn thing don't load up again. I want to add buttons that do this action for all skills in the game, so I don't wanna go through writing and changing the script only to find out its not working. Also after months of trying I cant believe ive got a script ive wrote to compile.

 

One other question, if this script works could I swap out where it says game.advanceskill for AddPerk to make another button to add perk point to the player?

 

I have the property filled in and aimed at the player under properties

 

Link to comment
Share on other sites

Hmmm not sure if this helps, but I use this ..

 

PlayerREF.ModActorValue("health", 1) ;adds +1 to player health permanently

 

 

If you want to do a generic script, where you can change / set the attributes of different aspects (ie; health, stamina, alteration etc)

 

PlayerREF.ModActorValue(myAttribute, 1) ;adds whatever property value is in 'myAttribute'

 

soo... you could change the myAttribute to be 'health', 'stamina', 'alteration', 'destruction' etc.. in the property settings

 

Edit:

Make sure you declare your attribute string

 

so script would be:

 

********************************************************************

Script myGenericAttributeChange extends ObjectReference

 

String myAttribute

 

Event OnActivate(blah blah)

 

;Do blah blah

PlayerREF.ModActorValue(myAttribute, 1) ;or whatever amount you want

 

EndEvent

 

*********************************************************************

Edited by LeianneG
Link to comment
Share on other sites

Thanks for the advice TheWilloughbian. Turns out the script compiles, but that's all it does lol, back to the drawing board

The Thing to watch out for is the CK won't save an esp if you have the same esp open in SSEedit or any other utility (like SSELODGen) at the same time. It will look like it's saving but it won't. Learned that the hard way. But yeah, if your rig can handle it you can run both. Just try not to have to large a cell or an exterior loaded in the CK render window while you run the game as it can stress the GPU a bit. I usually load up aaamarkers because it's pretty much empty. But you only need to worry about this if you working in the render window in first place, though.

Link to comment
Share on other sites

You know how to edit the ck ini to make less of a pain in the bum?

 

the Creationkit.ini in the data file

 

find

 

[MESSAGES]

bSkipInitializationFlows=1

bAllowYesToAll=1

iFileLogging=0

bAllowFileWrite=1

 

 

change to

 

 

[MESSAGES]

bSkipInitializationFlows=1

bAllowYesToAll=1

iFileLogging=0

bAllowFileWrite=1

bBlockMessageBoxes=1 <<<<<<<< this way you don't have to sit there and click yes to all for 30 mins

Edited by TheWilloughbian
Link to comment
Share on other sites

Thanks, I know it can be edited, I had to do it so I could load all the dlc's aswell as the game and update as masterfiles, but when it comes to programming I aint got a clue, so I tend to avoid it as much as I can unless I find a tutorial on it, thanks for the info, I'm gonna change it now.

Link to comment
Share on other sites

  • Recently Browsing   0 members

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