Hello everyone!
I really love old point and click adventure games which require you to use a specific item in an area or on an object for a special effect.
I want to have the ability for the player to gather an item into their inventory which they can navigate to at any time via the game's menu in order to select and 'use'. If they select this item to use it will react differently depending where they are in the world.
An easy example of this concept is if the player selects a key it gives a message saying "This cannot be used here". BUUUT if the player is standing in front of the locked door (standing on a specific tile for example) and they select and use the key it gives a different message such as "they key fits the lock" and then the player can progress through the now unlocked door.
I have this functionality currently working but it seems very roundabout and silly how I am performing this.
(Currently I am using the common event system activated by the use of the item, in combination with variables. The variables trigger as a player steps over a tile which has an on-event touch event to increase or decrease the variable. If the player chooses a key item, it reacts differently based on the current variable. This requires me to have a special tile in front of the locked door -for example- to be an event which sets the variable to the 'open number' and then the tiles AROUND that one to also be an event which returns the variable to 'non effect' as the player walks away from the door. It's a headache to explain and also seems very silly for programming my game!)
Thank you so much for any thoughts on how to better make this work. Any way to have an item be linked to behave differently when standing on a specific tile or location?
Using a key item from your inventory
● ARCHIVED · READ-ONLY
-
-
it'll be easier if you don't use the item features and a common event to check positions, but place the code inside the door, using the "select key item" command.
Basically, the player activates the door event regularly with the action button, the door event then asks the player to select one of the key items and then checks if it was the correct key or not, reacting differently based on what item was selected by the player...