I have a plot flag that I use to deactivate an NPC in the current area and activate another version of that NPC in an adjoining area.
It doesn't seem to be working though - I'm wondering if the problem is that I'm using GetObjectByTag when I'm defining the target object for the command that makes an object active and that doesn't work across areas?
If it doesn't, is there another command I should use?
Will GetObjectByTag get an object in another area?
Débuté par
PavelNovotny
, mars 19 2010 08:32
#1
Posté 19 mars 2010 - 08:32
#2
Posté 19 mars 2010 - 09:21
Generally speaking, the answer is no. You can only manipulate objects in your current area. The way we handle this in the main game is with the EVENT_TYPE_AREALOAD_PRELOADEXIT in the area script. When the player enters the second area, you check the plot flag, then change the active/inactive status of the creature accordingly.
That said, I believe that GetObjectByTag will work across areas if the two areas are in the same area list. I do not recommend taking this approach, but it probably will work.
That said, I believe that GetObjectByTag will work across areas if the two areas are in the same area list. I do not recommend taking this approach, but it probably will work.
#3
Posté 20 avril 2010 - 07:45
Thank you, David. Yes, yes, and Oh Yeah!
GetObjectByTag does work within an area list, but it's not particularly useful because I can't manipulate the referent unless it's the same area.
Oh Yeah: I wondered why I couldn't override EVENT_TYPE_AREALOAD_PRELOADEXIT. It only goes to area scripts. Thanks.
GetObjectByTag does work within an area list, but it's not particularly useful because I can't manipulate the referent unless it's the same area.
Oh Yeah: I wondered why I couldn't override EVENT_TYPE_AREALOAD_PRELOADEXIT. It only goes to area scripts. Thanks.





Retour en haut






