Jump to content

Having trouble changing GlobalVariable


Recommended Posts

What I was trying to say was that you'll need to trigger the function in some way. The function itself does nothing by merely being present in the script. An event, an activator, a messagebox, a dialogue option, they all achieve the same thing.

 

You shouldn't need another function to subtract from the current value.

 

You can test these things by using Debug.Trace, Debug.Notification, or Debug.MessageBox before and after the function is called to see the value of the global variable for yourself (as shown above).

Link to comment
Share on other sites

It will work with just kmyQuest.Test(-5) so yes, you can just add negative value.

 

If the value is 0 and you do that, it will be -5. If the value was 10, it will be 5 after that. You get the idea.

 

But if you need more functions you can always make more. It's pretty handy to call them from fragments. Once you get familiar with properties and couple scripts, soon you can make lots of cool stuff :smile:

 

Oh, and also when you are testing your mod ingame, you can do this console command "help xxx 3" and it will list all globals(that have xxx on their name) and you can see if it changes.

Edited by vkz89q
Link to comment
Share on other sites

  • 3 years later...
  • Recently Browsing   0 members

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