Jump to content

Memory Cells


Recommended Posts

Errhmm, this is a complex problem, since the door script is the most common, and most complex, default terrain script. The script doesn't check for memory cell 0 to check to see if it is locked. You must unlock it with an SDF, or give that particular door a special script for this to work.

 

EDIT: You could use either the 2 flags you just set or a different one. There are thousands to choose from. The effect from the flag will be immediate and the door will unlock when you step into it. In case you don't know, Terrain memory cells 2 and 3 are the SDF coordinates in the door script. If sdf(cell 2, cell 3) = 0, door is untouched, if greater than 0, than it is unlocked. Period.

Link to comment
Share on other sites

Grrr... I just explained that in my first post. You know that most of the time a locked door will stay locked when you leave the town and come back? But sometimes it stays unlocked? The reason why it stays unlocked is usually because of an SDF that was set [to a number greater than 0] the first time you unlocked the door.

 

The coordinates of the SDF to be set to 1 is stored in the door's memory cells 2 and 3. If

cell 2 = 5 and

cell 3 = 0,

then your code that you provided would cause your door to unlock upon contact with the party. This is because SDF{5,0} was set to 1 in your code, which, to the door script, means that the door has been unlocked.

 

It is very preferable to set this value in the editor, just like where you set up cell 0 for its lock difficulty. Set the door's memory cell 2 to 5 and cell 3 to 0 and then test it again. If it doesn't work, come back and tell me it didn't work.

Link to comment
Share on other sites

Guest
This topic is now closed to further replies.
×
×
  • Create New...