Zones
xordevoreaux
05 Aug 2007, 15:26How difficult would it be to implement a zone feature, similar to the collection of rooms feature in Adrift, which is really useful for basically dropping an NPC into the zone and letting the platform move the NPC around the rooms contained within the zone rather than having to hand-craft a movement system.
I could use the "When the player enters room" script to flip an outdoor/indoor variable, so that the player's activities are restricted appropriately when indoors, or to cause storms to affect the player only when outdoors, change ambient lighting level, etc.
I know I'm not making a strong case for them but I somehow think zones with properties and events to hang scripts from could to be useful.
I could use the "When the player enters room" script to flip an outdoor/indoor variable, so that the player's activities are restricted appropriately when indoors, or to cause storms to affect the player only when outdoors, change ambient lighting level, etc.
I know I'm not making a strong case for them but I somehow think zones with properties and events to hang scripts from could to be useful.
Kitaan
13 Aug 2008, 23:05As for the indoor/outdoor idea, whatever script you have that runs the storms e.t.c just add a property to a room such as "outdoor" and get it to check that the current room has that property before it executes the script
ender
25 Nov 2009, 17:33I doubt this is necessary anymore ... but I solve this by creating a room to be my zone, and then a property called parent with a value of the room name for each of my rooms in the zone. This is a little more complicated than what kitan suggested, but I am using it with other scripts so that sub rooms can inherit qualities from the larger room. I.e. I have a property called 'floor' ... for a command 'examine floor' ... if the property exists within the current room, then it responds with that ... if it doesn't, then it checks to see if the property exists within the rooms parent, and so forth an so on until it runs out of parents and if everything fails, it gives the default response. This allows me to do things like build a 'house' with my floor description in a convenient place that I can change for all my rooms at once if I want ... or in the kitchen I can give the place a grungy floor ... I am also working on trying to use this to allow rooms to inherit 'go to' directions from their parent ... that way if I have a city with the same go to areas for each room ... I don't have to put that script in for EVERY room one at a time which can get tedious ... especially if I have to change it later for some reason (I know procs can be used for this, but I like the organizational structure of the QDK) ... also thinking I might be able to use it for 'inherited' objects so that I could simulate Inform 7 style backdrop objects... we'll see... if I get this where I like it and refined I may put it together into a library...
I guess it depends on how you want to use the room grouping.
I guess it depends on how you want to use the room grouping.