redeyesandlonghair Posted February 13, 2012 Share Posted February 13, 2012 So I'm trying to do something neat with these two mods: Wasteland Moods weatherZombie Apocalypse The goal is to have Zombie Apocalypse only spawn zombies when the Wasteland Moods weather controller sets the weather to "Silent Hell". I have Silent Hell set to create a cool green radiation fog, and having zombies attack me when I can't see more than two inches in front of my face seems neat; it's also an ode to those night of the living dead movies where the zombies where activated by trioxin gas. Anyways, the way I'm attempting to do this is through the use of a global xxGreenGas. On the Zombie Apocalypse side, I've made it so that the zombiespawnscript will only spawn zombies if xxGreenGas is set to 1. Tested it in game and it works just like I want it to. However, I can't get Wasteland Moods to set xxGreenGas to 1. I went in to the scripts, and in every single instance where I saw that the script was setting the weather to Silent Hell, I added the line "Set xxGreenGas to 1", and anytime it set the weather to any of the other types, I added "Set xxGreenGas to 0" The problem is, it's refusing to set xxGreenGas to 1, which has me baffled. Basically the area where I added this line looks like this: If somevariable = X set weather to silenthellSet xGreenGas to 0 set somevariable to Xset somevariable to Xset somevariable to Xset somevariable to X So as you can see, the script itself sets the weather, then sets four script variables. I figured that throwing my line into the middle of all that should guarentee that it occurs.. but it doesn't. I did this with every script where wasteland moods seems to set the weather, which includes the script where it changes the weather through use of the menu, as well as the script that changes the weather without any input from the user. the xxGreenFog global is present as a resource in both Zombie Apocalypse and Wasteland Moods, so they both have access to it. So I'm wondering why the heck wasteland moods is just flatout refusing to set this variable. Is there some other way to have a script set a global variable when a certain custom type of weather is active? Link to comment Share on other sites More sharing options...
Xepha537 Posted February 14, 2012 Share Posted February 14, 2012 Can you just clarify what the name of your global is? You start referring to xxGreenGas, then towards the end of your post it is xxGreenFog? Also, in the code snippet you gave, you have "Set xGreenGas to 0". I've a feeling you just typoed, but just wanted to make sure you're not getting yourself needlessly confused. Which mod does this global originally come from? Because the other mod will have to be made dependent on it, so it can "see" the global. With Fo3edit, you would have to have copied (as override) this global variable to the other mod. By doing this, both mods are talking about the same global (same formID), and not two seperate ones (different formIDs) which is possibly what is happening and why the global isn't being set. Link to comment Share on other sites More sharing options...
redeyesandlonghair Posted February 14, 2012 Author Share Posted February 14, 2012 It's xxGreenFog. And I think you just solved my problem. I didn't realize that globals had their own FormIDs, I thought they were only identified by name. Cracking open FO3Edit reveals that in weather controller, xxGreenFog has the FormID 08A059, and in Zombie Apocalypse it's 00A809. Probably because instead of the "copy as override" method, I just created xxGreenFog seperately for each mod in the GECK. No doubt it will work now, thank you very much for your assistance :thumbsup: Link to comment Share on other sites More sharing options...
Recommended Posts