GetIsID ObjectIDReturns 1 if the calling object is a reference to ObjectID. The parameter for this function is a base object ID, as defined in the object window.
HorsePCWhiteAnvil is the Object ID.
HorsePCWhiteAnvilRef is the Reference Editor ID.
let horseRef := GetPCLastHorse
should return HorsePCWhiteAnvilRef (my last ridden horse)
if horseRef.GetIsID HorsePCWhiteAnvilRef
<- doesn't work because I have to use an Object ID.
Then, if I use:
if horseRef.GetIsID HorsePCWhiteAnvil
HorsePCWhiteAnvil never matches horseRef because horseRef is Reference Editor ID (HorsePCWhiteAnvilRef) that is put in the world space.
Another try:
GetIsReference ReferenceIDReturns 1 if the calling object is the specified reference.As opposed to GetIsID, which checks against the base object ID as defined in the object window,this function takes a specific reference as a parameter. The reference must be persistent.
if horseRef.GetIsReference HorsePCWhiteAnvilRef
<- this should work. But it doesn't!
What's going on? Well, horseRef.GetIsReference seems to be treating HorsePCWhiteAnvil as the calling object instead of HorsePCWhiteAnvilRef, which is the reference I want to match against!
Another try:
[Ref.]GetBaseObjectReturns the base object of that reference.Notes: * If Ref is a base object already, then calling BaseObjectRef.GetBaseObject will halt the script (quest scripts will show as still running but won't execute any more).
let baseObj := horseRef.GetBaseObject
(In this case, should return HorsePCWhiteAnvil)
if baseObj.GetIsID HorsePCWhiteAnvil
<- this freezes the script and I don't know why again...
It is being very frustrating to handle these peculiarities...