OperatiC Posted May 27, 2017 Share Posted May 27, 2017 (edited) I am making mod about more hirelings. And I wanted to adjust prices based on level of hirelings. By using topic info scripts I put a calculations that affects global variable. This topic is all about asking the cost of hireling. Then I am offering two options: You are hired!(<Global=MyGlobalVariable> Gold)orSorry I have to go. Whenever I asked the cost, it displays 300(which is I set it myself), but it takes the right amount. Any idea? Thanks... Edited May 27, 2017 by OperatiC Link to comment Share on other sites More sharing options...
Ghaunadaur Posted May 27, 2017 Share Posted May 27, 2017 1. Is the global variable added to the global list of the quest? 2. Try using function UpdateCurrentInstanceGlobal before. Link to comment Share on other sites More sharing options...
OperatiC Posted May 27, 2017 Author Share Posted May 27, 2017 1. Yes I added the global variable. 2. I used it in my topic info script but it said "UpdateCurrentInstanceGlobal is not a function or does not exist" Link to comment Share on other sites More sharing options...
Ghaunadaur Posted May 27, 2017 Share Posted May 27, 2017 2. I used it in my topic info script but it said "UpdateCurrentInstanceGlobal is not a function or does not exist"Yep, UpdateCurrentInstanceGlobal needs to be called on a quest or from a quest script. GetOwningQuest().UpdateCurrentInstanceGlobal(MyGlobalVar) Link to comment Share on other sites More sharing options...
OperatiC Posted May 27, 2017 Author Share Posted May 27, 2017 Oh my god. Thanks man it worked. Link to comment Share on other sites More sharing options...
Recommended Posts