Jump to content

SetAreaRestFlag


wolpak

Recommended Posts

I was messing around with this to see how it worked. I simply added this into baldur.bcs...

 

IF
Global("REST","GLOBAL",0)
THEN
RESPONSE #100
DisplayStringHead(Player1,111)
SetAreaRestFlag(0)
SetGlobal("REST","GLOBAL",1)
END
The string is to make sure the script ran. It did, and I could still rest. I figured maybe I had the wrong toggle, so I put in (1) for SetAreaRestFlag and I could rest. Am I missing something?
Link to comment
I am not sure how that affects SetAreaRestFlag...I assume it is updating that value.


Would the following work then? I presume it would make it impossible to rest in this location always...but it still doesn't work.


IF

Global("REST","GLOBAL",0)

THEN

RESPONSE #100

DisplayStringHead(Player1,111)

SetAreaRestFlag(4)

SetGlobal("REST","GLOBAL",1)

END

Link to comment

well no, you're just setting it to a forest type. For non-pst, I think you have two choices, either set the type to indoor (no bits set, I guess? But that didn't work for you initially, so check what value indoor areas have - in which you can't rest) or to make sure areaflag bit 0 is not set (but I don't know if you can modify it; there is a http://gemrb.org/iesdp/files/ids/bg2/areaflag.htm).

Link to comment

If you need to prevent resting in outdoors, you can append the top of PLAYER1D.BCS (Player1's dream script) with something like:

IF
Global("cant_rest","myarea",1)
THEN
RESPONSE #100
DisplayStringNoName(Player1,~You may not rest in this place.~)
END

and SetGlobal("cant_rest","myarea",1) as needed.

As long as the variable remains 1, this block will trigger and break the rest attempt.

Link to comment

Archived

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

×
×
  • Create New...