Trigger for visited area?
lansounet
Member Posts: 1,182
Say I have a creature that can teleport me to various area through dialogue actions, but I only want the response for each travel option to be available only if the area has been visited before.
Is there a trigger - like VisitedArea("AreaRes") - to allow this? Or do I have to EXTEND_TOP every one of those areas with some
Is there a trigger - like VisitedArea("AreaRes") - to allow this? Or do I have to EXTEND_TOP every one of those areas with some
IFand check for Global("Visited[Area]","GLOBAL",1) in each response?
OnCreation()
Global("VisitedThisArea","GLOBAL",0)
THEN
RESPONSE #100
SetGlobal("Visited[Area]","GLOBAL"1)
0
Comments
What's the deal with OnCreation() ?
<<<<<<<< .../mymod-inline/area_add.baf
IF
Global("Visited%area%","GLOBAL",0)
THEN
RESPONSE #100
SetGlobal("Visited%area%","GLOBAL"1)
Continue()
END
>>>>>>>>
ACTION_FOR_EACH area IN ar1234 ar5678 ar9101 BEGIN
COPY_EXISTING ~%area%.are~ ~override~
READ_ASCII 0x94 script
BUT_ONLY
EXTEND_TOP ~%script%.bcs~ ~.../mymod-inline/area_add.baf~ EVALUATE_BUFFER
END
My beef with OnCreation and EXTEND_TOP is mainly my conservative coding nature--I'd rather my own mod fail than break someone else's (i.e. reveal city areas and ar0300 in Tweaks). For whatever reason, I feel like I see OnCreation()/Continue() in particular abused in area scripts when the scripting would be perfectly fine waiting for the next script cycle.