Jump to content

Area variables question


Red Carnelian

Recommended Posts

Can someone clarify this question for me please.

 

Do area variables reset when you re-enter the area they are created.

 

For example if I visit area AR4300 for the first time this block of code evaluates to true and activates the trigger. If I leave the area and then return will "CaveDoorActive" reset to 0 and execute the block again if all conditions are met?

 

IF
GlobalGT("CearwinQuest","GLOBAL",1)
Global("CaveDoorActive","AR4300",0)
THEN
RESPONSE #100
TriggerActivation("DoorS001",TRUE)
SetGlobal("CaveDoorActive","AR4300",1)
END

Link to comment

Can someone clarify this question for me please.

 

Do area variables reset when you re-enter the area they are created.

 

For example if I visit area AR4300 for the first time this block of code evaluates to true and activates the trigger. If I leave the area and then return will "CaveDoorActive" reset to 0 and execute the block again if all conditions are met?

 

IF

GlobalGT("CearwinQuest","GLOBAL",1)

Global("CaveDoorActive","AR4300",0)

THEN

RESPONSE #100

TriggerActivation("DoorS001",TRUE)

SetGlobal("CaveDoorActive","AR4300",1)

END

(Area) Globals are stored in the savegame. Once the condition and the global has been changed, this status is retained, i.e. you should find an area always in the state you have left it.

 

PS - you may find errors in the game, especially in area scripts, so what I said above applies to correctly coded scripts. (and you should exchange the two lines in your action block

SetGlobal("CaveDoorActive","AR4300",1)

TriggerActivation("DoorS001",TRUE))

Link to comment

 

Can someone clarify this question for me please.

 

Do area variables reset when you re-enter the area they are created.

 

For example if I visit area AR4300 for the first time this block of code evaluates to true and activates the trigger. If I leave the area and then return will "CaveDoorActive" reset to 0 and execute the block again if all conditions are met?

 

IF

GlobalGT("CearwinQuest","GLOBAL",1)

Global("CaveDoorActive","AR4300",0)

THEN

RESPONSE #100

TriggerActivation("DoorS001",TRUE)

SetGlobal("CaveDoorActive","AR4300",1)

END

(Area) Globals are stored in the savegame. Once the condition and the global has been changed, this status is retained, i.e. you should find an area always in the state you have left it.

 

PS - you may find errors in the game, especially in area scripts, so what I said above applies to correctly coded scripts. (and you should exchange the two lines in your action block

SetGlobal("CaveDoorActive","AR4300",1)

TriggerActivation("DoorS001",TRUE))

 

 

Thanks Roxanne. Makes sense to me now.

Link to comment

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...