Jump to content

Script comparison Ref two mods


orubicon

Recommended Posts

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 1
endif
endif
if occ != 1 - somehow always works
or
ref gaMerchant
ref occ2
if IsModLoaded "Oblivion Collectible Cards.esp"
let occ2 := GetFormFromMod "Oblivion Collectible Cards.esp" "020015AC"
if occ2 == gaMerchant
set occ to 1
endif
endif
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

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
    
End

That 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 by Contrathetix
Link to comment
Share on other sites

  • Recently Browsing   0 members

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