GetFormFromFile trouble

Post » Tue Mar 05, 2013 11:43 pm

Ok so I'm attempting to enable a sound effect when a certain weather form is in use by another mod.

The fragment looks something like this:

If Weather.GetCurrentWeather() == (Game.GetFormFromFile(0x00012345, "SomeMod.esp"))	  soundfx1.Enable()EndIf

It looks like good code to me but it will not work no matter how much I threaten it. I'm sure the syntax and spelling is correct.

Any suggestions?
User avatar
Crystal Clarke
 
Posts: 3410
Joined: Mon Dec 11, 2006 5:55 am

Post » Tue Mar 05, 2013 11:52 am

You need to declare what that form id is, example:

Weather kWeather = Game.GetFormFromFile(0x00012345, "SomeMod.esp") as Weatherif SomeCell.GetWeather() == kweatherendif

Obviously not exact code, but you need to use it like that :smile:

I'd have written it better if i wasn't on my phone.
User avatar
Charleigh Anderson
 
Posts: 3398
Joined: Fri Feb 02, 2007 5:17 am


Return to V - Skyrim