orubicon Posted May 26, 2016 Share Posted May 26, 2016 Help write condition, a comparison of the ref two mods if IsModLoaded "Oblivion Collectible Cards.esp"let occ2 := GetFormFromMod "Oblivion Collectible Cards.esp" "020015AC" if occ2 == GetActiveMenuRef 1008 set occ to 1endifendif if occ != 1 - somehow always works orref gaMerchantref occ2 if IsModLoaded "Oblivion Collectible Cards.esp"let occ2 := GetFormFromMod "Oblivion Collectible Cards.esp" "020015AC" if occ2 == gaMerchantset occ to 1endifendif if occ != 1 - somehow always works When trade opened the menu at the NPC from the other mod, the condition does not work. Link to comment Share on other sites More sharing options...
Surilindur Posted May 26, 2016 Share Posted May 26, 2016 (edited) No idea what it is you are after, and I have my own projects at the moment, but just a thought. If you want to compare two refs using the "==" thingy, you could try applying the OBSE compiler override and then add Eval after If, with lots of parentheses to make sure the outcome is what you expect it to be. No idea if it will help, just an idea. A bit like this (as an example): ref rSomeRef int iSomeInt Begin _MenuMode 1008 let iSomeInt := 0 If Eval ( IsModLoaded "SomeMod.esp" ) If Eval ( ( GetFormFromMod "SomeMod.esp" "001234" ) == ( GetActiveMenuRef 1008 ) ) let iSomeInt := 1 EndIf EndIf MessageBoxEX "iSomeInt: %.0f" iSomeInt EndThat has not been tested, it might not even work out of the box. Just a quick idea. It will spam the messagebox constantly if it works, too. :P Edited May 26, 2016 by Contrathetix Link to comment Share on other sites More sharing options...
orubicon Posted May 26, 2016 Author Share Posted May 26, 2016 If Eval ( ( GetFormFromMod "SomeMod.esp" "001234" ) == ( GetActiveMenuRef 1008 ) ) not work :mellow: Link to comment Share on other sites More sharing options...
Maskar Posted May 26, 2016 Share Posted May 26, 2016 Looks like you're comparing a base object with a reference. That will never work. Link to comment Share on other sites More sharing options...
orubicon Posted May 26, 2016 Author Share Posted May 26, 2016 Yes, thank you. On ref everything worked. Link to comment Share on other sites More sharing options...
Recommended Posts