Quest task design

It’s not an “event” in the “listener” sense. It’s an event in the human sense… something happened.

Game objects have a list of ‘methods’ that are dynamically defined in groovy scripts. For example, a chest may have an “open” method and a “close” method that does some action. A log may have a “light” method while a lit log would have an “extinguish” method.

The game calls certain “methods” when objects are interacted with.

So when a player tries to pick up an object, the “take” method’s script is run (I don’t remember if ‘take’ is the actual name I used or not… it’s been a while). The default ‘take’ script for all objects transfers the entity from the world to the player’s inventory. But the script can be overridden by specific object types to do other things… electrocute the player, spawn monsters, or simply not allow itself to be picked up.

This started out as wanting to have dynamic popup menus for when the player right clicked on objects and just kind of extended from there. In the unreleased version 2 engine, even the tools/wands you held in your hand were activated this way… by calling the ‘activate’ method.

I’m not sure how dominant this system will be in the new engine yet but it will definitely be there.

1 Like