Quest Room Exit Function

paul_one
05 Aug 2003, 21:40
Hiya All,

I just wanted peoples thoughts on a $RoomExit( #room# ; #direction# )$ function...
I personally would think it would be very nice, being able to move NPC's around even easier and knowing the exits for making maps etc...
You could even have a list appear if -1 or the string "LIST" is passed to the function in place of #direction# which would be nice for processing room descriptions (ie, your current room and a rough description of the room ahead, or maybe below if you're flying!).

I just thought it's easier then moving the player to that room, finding and processing the exit's list and then returning the player to the former room :wink: .

So please add your thoughts! And what do you think Alex? Is it added to the list?

I think Im Dead
06 Aug 2003, 02:04
Well, when creating an engagement system I was stuck with the problem of handling distance when retreating or advancing while engaged to multiple targets. I handled this by giving players a property called enemies(representing the amount of enemies they are currently engaged in combat with) which is increased by one when they are engaged by a mob or other player. When thinking about implementing a tracking type skill(just toying with for now) and also when thinking about moving Mob's around in a logical but still random manner through available exits in the current room to the next and so fourth, it seemed simple enough to me to give a room a property of exits, it's value would be the number of exits in the room, and there would be a corresponding property of exit-1, exit-2, etc. stating which direction the exit leads to(probably an exit-1-room, exit-2-room, etc. property too, just to make it easy to extract the actual name of the room to move the mob to, as well as handle 'out' and 'go to' type exits). If you gave mobs a property with the value equaling the currentroom, you could then use...


set string <mob-room; $objectproperty(#quest.thing#; currentroom)$>
for <exits.currentroom; 1; $objectproperty(#mob-room#; exits)$>
etc...



To determine the npc's next movement. Sure a built in function would be nice, but it's easily possible already.

I do think however that it would be great to make a very well documented set of libraries(or perhaps one large library, which is what I'd like my game core to be ultimately) that could allow for game creators to use functions like these within their single player or multi-player games. Unfortunately, all my attempts at making a library have been unsuccessful, I've read the documentation on them, though I will admit not extensively. It seems they are quite picky about the placement of sections of code(functions, text blocks, etc.) or perhaps I just haven't tried hard enough. Either way, it is a good idea for a function, but a built in one, I'm not sure of. Perhaps grouping ideas to work on a npc creation/attitude/action control library. Not necessarily between you and I, but to two equally interested parties.

Perhaps this problem could be best solved with extending the QuestNet used variable system of #quest.currentroom[userid]# to include any object within the game(it may already support this, I have no idea).

I got no dukes, tell me what you think of my shared ideas.

EDIT: I don't know how I'd vote so I'll say, it's a really good idea but not best implemented as a function.