Editing Checking if a Mod is affecting an Object

Warning: You are not logged in. Your IP address will be publicly visible if you make any edits. If you log in or create an account, your edits will be attributed to your username, along with other benefits.

The edit can be undone. Please check the comparison below to verify that this is what you want to do, and then publish the changes below to finish undoing the edit.

Latest revision Your text
Line 19: Line 19:
   
   
  short sDoOnce
  short sDoOnce
ref rIsAffected
   
   
  Begin BlockName
  Begin BlockName
Line 29: Line 28:
  ; without preventing the OnLoad block from running
  ; without preventing the OnLoad block from running
  else
  else
  set rIsAffected to ObjectRefID.rIsAffected
  if ObjectRefID.rIsAffected.GetIsReference IsAffectedRef
if rIsAffected.GetIsReference IsAffectedRef
  ; Object has not been overridden
  ; Object has not been overridden
  else
  else
Line 40: Line 38:


If you want to check whether or not a Mod is affecting an Object in a condition (for example, for a button on a message) then you'll have to use a bit of a workaround.  Because these sorts of conditions can't check if a variable is equal to a reference, you'll have to do something like create a quest script declaring an "sObjectIsAffected" variable, and a result script like this:
If you want to check whether or not a Mod is affecting an Object in a condition (for example, for a button on a message) then you'll have to use a bit of a workaround.  Because these sorts of conditions can't check if a variable is equal to a reference, you'll have to do something like create a quest script declaring an "sObjectIsAffected" variable, and a result script like this:
  set sQuestName.sObjectIsAffected to (ObjectRefID.rIsAffected == IsAffectedRef)
  set sQuestName.sObjectIsAffected to (ObjectRefID.rIsAffected.GetIsReference IsAffectedRef)
Now, you can check if "sQuestName.sObjectIsAffected == 1" in your condition.
Now, you can check if "sQuestName.sObjectIsAffected == 1" in your condition.


Please note that all contributions to the Fallout3 GECK Wiki are considered to be released under the Creative Commons Attribution-ShareAlike (see GECK:Copyrights for details). If you do not want your writing to be edited mercilessly and redistributed at will, then do not submit it here.
You are also promising us that you wrote this yourself, or copied it from a public domain or similar free resource. Do not submit copyrighted work without permission!

Cancel Editing help (opens in new window)