Jump to content

Is it safer to use global variables or conditional variables inside a script?


trepleen

Recommended Posts

Posted

I need to keep track of minor actions a follower has performed.

 

Is it safer to use global variables using GetGlobalValue, or using conditional variables inside a script using GetVMQuestVariable?

 

I've heard that replacing a mod with a newer version can have problems with script variables and/or global variables.

Posted

one of those computer science problems that will probably never be truely solved, because of human emotion and cleverness (or lack thereof)

 

from a long time programming background, global variables are the devil. and the few skyrim mods i tried to tweak and submit new features to, i ended up completely rewriting because of their crazy use of globals.

 

i don't think either have problems the other do not have with updating. the problem is the skyrim save system itself.

MyController extends Quest
Bool Property Someshit = False auto hidden
MyOtherScript extends Whatever
MyController Property Mine auto

Function Whatever()
    DoShit(Mine.Someshit)
EndFunction

imho, is the boss.

Posted

one of those computer science problems that will probably never be truely solved, because of human emotion and cleverness (or lack thereof)

 

from a long time programming background, global variables are the devil. and the few skyrim mods i tried to tweak and submit new features to, i ended up completely rewriting because of their crazy use of globals.

 

i don't think either have problems the other do not have with updating. the problem is the skyrim save system itself.

MyController extends Quest
Bool Property Someshit = False auto hidden
MyOtherScript extends Whatever
MyController Property Mine auto

Function Whatever()
    DoShit(Mine.Someshit)
EndFunction

imho, is the boss.

 

Sounds good, I appreciate the technique.

 

 

Posted

 

Sounds good, I appreciate the technique.

 

[just in case:] don't forget to make this work, you'll need to set the quest instance of MyController to Mine in creationkit property dialog.

Posted

If you are creating a mod that will use an MCM menu then the script for the MCM menu is an ideal location for those variables since the MCM menu is often used to alter those settings.

Archived

This topic is now archived and is closed to further replies.

  • Recently Browsing   0 members

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