Jump to content

Recommended Posts

Posted (edited)

Okay, as you can see, I have debugs set up for each function, and the debugs are reading when I cast the spell to update the global, but the global is not being updated. The function in question, I'm assuming, is "Experience". All of the formlists are set properly, the scripts are attached to a Start Game Enabled, Run Once quest with all the global properties set. However, it just won't update.

 

Edit - Just realized the CheckLevelAttack function isn't updating the global either. What am I doing wrong?

 

 

  Reveal hidden contents

 

 

 

The script to update the global

 

 

  Reveal hidden contents

 

 

The framework, to show all globals are in place

 

 

  Reveal hidden contents

 

Edited by Rizalgar
Posted

The way you are trying to pass the GV data from the quest script on to the other script is a bit funky. I've not seen that method before. But I feel that that is where it is breaking down. I get what you are trying to do, use a function to return the script and then another function to grab and pass on the global variable. I'm just not sure that that method works.

 

Here is a non-property method of getting the other script and then using data from said other script.

 

  Reveal hidden contents

 

 

Also your magic effect script seems to want to use the framework leveling script but has no indication that that script has been defined for use in any way. Surprised that that would compile. Perhaps that is the actual problem? Maybe check that out first and make sure you're properly linking the scripts together.

 

Posted (edited)

Thank you Ishara! I shall definitely give it a shot and check into the magic script. Although, I'm assuming the magic script works because I am getting the debug notifications showing the functions are being called. However, I will try your method, cause you have yet to let me down

 

--Edit-- I admit, I'm lost. I'm not sure how to call this.

 

--Edit2-- This is what I did

 

 

  Reveal hidden contents

 

 

But now I am getting compiler errors for the CheckLevelAttack() function

 

--Edit3-- Nevermind, I'm just a dope and forgot an EndFunction

 

-_Edit4-- Still won't compile. It is saying RS3FD isn't a function or doesn't exist.

 

--Edit5-- Lots of edits, again, I'm just a dope

 

--Edit6-- " cannot call member function GetAttackXP in global function experience without a variable to call it on ". Hitting my "Oh, come on, just work already" point.

 

The edited script

 

  Reveal hidden contents

 

 

I have tried it with the skills like this as well. Still throws errors of a different sory

GlobalVariable Function GetConstructionXP() Global
	GetData.RS3_GV_ConstructionXP.GetValue()
EndFunction 

Maybe one of you can make sense of this. This is the debug trace from the script when I call to the experience function. I have no idea what I'm looking at

 

 

  Reveal hidden contents

 

Edited by Rizalgar
Posted

Always test on a new game or at least one that has not seen the mod in question. Why? Some things do not update properly when changed while the object has already been loaded in memory.

 

Why are the functions all globals? Are you trying to make something that anyone can use (like MCM)?

 

If you really want something that utilizes global functions on a global script, have your magic effect call a function on the script with the global variable properties. Then that function can pass the necessary global variable values as parameter entries into function calls on the global script which will return float variables for you to use to set / mod values on the global variable property script.

Posted (edited)

It does get updated in an MCM menu if that's what you mean. I think I know what you mean lol. I had to read it a few times though

 

Oh, and I always test on a new game. Thank Atheismo for Alternate Start!

 

--Edit-- I have absolutely no idea what I did, but it's working now. Thank you, Ishara!

Edited by Rizalgar
  • Recently Browsing   0 members

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