Jump to content

DOWNLOAD MODS

Are you looking for something shiny for your load order? We have many exclusive mods and resources you won't find anywhere else. Start your search now...

LEARN MODDING

Ready to try your hand at making your own mod creations? Visit the Enclave, the original ES/FO modding school, and learn the tricks of the trade from veteran modders...

JOIN THE ALLIANCE

Membership is free and registering unlocks image galleries, project hosting, live chat, unlimited downloads, & more...

How to compare a REF to an EditorID?


ulrim
 Share

Recommended Posts

ref horseRef


short horseFound

short showMsg


set horseRef to GetPCLastHorse


if horseRef == HorsePCWhiteAnvilRef  ; original intention, isn''t recommended to use


(also tried:)


if horseRef.GetIsReference HorsePCWhiteAnvilRef  ; EditorID

if horseRef.GetIsID HorsePCWhiteAnvil  ; Base Object


(and this stops script from running because HorsePCWhiteAnvil is already a Base Obj.


set baseObj to horseRef.GetBaseObject


if baseObj.GetIsID HorsePCWhiteAnvil


  let horseFound := 1

  let showMsg := 1

  ; do something

else

  let horseFound := 0

endif


if showMsg

  if horseFound

    Message "I Found AnvilWhite horse."

  else

    Message "I found nothing."

  endif

  let showMsg := 0

endif[/code]

Results:

Found nothing so far.

Can you help me find it?

Edited by ulrim
Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

 Share

×
×
  • Create New...