Doors, keys and events that crash...

Im trying to get a "pick up keys to open locked doors in the dungeon" kinda system going in my game (similar to the dungeons in Legend of Zelda games). And it works beautifully... to an extent.
the doors are opened when the player walks into an event tile, which changes the map cells of the door and deletes a key from the players inventory (once checking against the "gb_number of keys" global). it also adds to a global for the specific door to keep it open when the player leaves and returns to that location.
The problem is that i want the event tiles which trigger the whole lot off to be deleted at the end of the chain of actions (so the player doesn't have keys stolen from his inventory for no reason)... i set this to happen and my game cuts out :frown:
does coldstone have a problem with changing an event tile while the player is standing on it? if it does im up a certain creek without a paddle 😕
if anyone can see where im going wrong or can think of another way to do the whole "keys and locked doors" system i'll be eternally gratefull. 🙂
cheers all, Migraine.

------------------
"If it's too hard, I can't understand it."

Quote

Originally posted by Migraine:
if anyone can see where im going wrong or can think of another way to do the whole "keys and locked doors" system i'll be eternally gratefull.:)

Mr. Migraine,

2 quick thoughts here:

Make an event that places the "unlocking the door" event if the global that regulates the door is not flipped. Thus once the door is unlocked the event never gets loaded since the conditional evaluates to false.

Next, in your actual unlocking the door event, have a conditional at the very top that checks your global. If the global is tripped, and the door is unlocked, just send the event to an "End Event" object so it exits out without any dialogs or anything else and you don't have to worry about the player walking on and off the event several times before he leaves the area.

This way you will not need to worry about deleting the event immediately upon unlocking the door, and when the player next returns to the area you don't have to worry about the event loading(or needing to remove it).

(edit) Fixed a typo and added a little clarity (/edit)
------------------
"But soon, soon, soon... the world will be a better place, with meadows and bunnies and fiber optics in every home..."
- Tom Dowdy, Apple Computer
------------------
(url="http://"http://www.avalon.net/~honda/pog/pogwalkthrough2a.htm")PoG Walkthrough and Compendium(/url) | (url="http://"http://www.ambrosiasw.com/cgi-bin/vftp/dl-redirect.pl/PoG_Dev_Tools_Source.sit?path=coldstone/resources&file;=PoG_Dev_Tools_Source.sit")PoG Dev Tools(/url)

(This message has been edited by Stark Bledfast (edited 08-19-2002).)

Albert Einstein... Stephen Hawking... Stark Bledfast...

It works like a charm! You have no idea how much I grinned when I saw it working, hehe (i think my problem is I'm still thinking in terms of "Klik n Play").
Thank you,
Migraine.

------------------
"If it's too hard, I can't understand it."

Quote

Originally posted by Migraine:
It works like a charm!

Excellent! Glad to hear it worked.

------------------
"But soon, soon, soon... the world will be a better place, with meadows and bunnies and fiber optics in every home..."
- Tom Dowdy, Apple Computer
------------------
(url="http://"http://www.avalon.net/~honda/pog/pogwalkthrough2a.htm")PoG Walkthrough and Compendium(/url) | (url="http://"http://www.ambrosiasw.com/cgi-bin/vftp/dl-redirect.pl/PoG_Dev_Tools_Source.sit?path=coldstone/resources&file;=PoG_Dev_Tools_Source.sit")PoG Dev Tools(/url)