Hello everyone,
I've been trying to make a GUI that uses some elements from the one used in the Legend games Death Gate and Shannara. Specifically, I've had problems trying to make a different text appear depending on which inventory item is used on which thing.
For example, say there's a door in the room that's locked. If the player's active inventory item is a key, the text should say "Unlock door with key". If it's a hammer, it should say "Break door with hammer". If it's a magic wand, it would say "Make door disappear". And so on.
If there was a "mouseover" function for everything, it would be simple to define specific items and text for each thing (object, hotspot, character, invitem) but as there isn't it all has to go in repeatedly_execute, right?
For objects and hotspots that's not much of a problem, since they're unique to each room. There can be a function called there that checks the current object/hotspot and active inventory and returns the relevant line. Doing the same for characters and inv. items though means there has to be one global function, as they could be in any room, and I'm concerned it would be a problem for memory/performance issues.
Is there something I'm overlooking, or a simpler way to make this work?
I've been trying to make a GUI that uses some elements from the one used in the Legend games Death Gate and Shannara. Specifically, I've had problems trying to make a different text appear depending on which inventory item is used on which thing.
For example, say there's a door in the room that's locked. If the player's active inventory item is a key, the text should say "Unlock door with key". If it's a hammer, it should say "Break door with hammer". If it's a magic wand, it would say "Make door disappear". And so on.
If there was a "mouseover" function for everything, it would be simple to define specific items and text for each thing (object, hotspot, character, invitem) but as there isn't it all has to go in repeatedly_execute, right?
For objects and hotspots that's not much of a problem, since they're unique to each room. There can be a function called there that checks the current object/hotspot and active inventory and returns the relevant line. Doing the same for characters and inv. items though means there has to be one global function, as they could be in any room, and I'm concerned it would be a problem for memory/performance issues.
Is there something I'm overlooking, or a simpler way to make this work?