Feature for next beta...

I think Im Dead
11 Jul 2003, 07:09
I'm thinking a #quest.players# or a #quest.formatplayers# similar to the built in variables for objects. While it is possible to use ASL to sort through the variables and figure out player or object using properties, these variables would probably make it much easier. Probably not too hard to implement considering that there is a set name(or name pattern) for player objects.

Just an idea.

Jakk
11 Jul 2003, 09:23
If you wish to know how many players are online, you could have a variable that adds one to it every time someone logs on. Make it so it minuses one everytime someone logs off. I would show you how to do this, but I'm kind of lazy right now, I'll do it later.

I think Im Dead
11 Jul 2003, 15:53
OK let me explain...

There are already variables called #quest.objects# and #quest.formatobjects#.

#quest.objects# is the display name of each object in the currentroom,
ie: a small dog, a brown shoe, a rotting corpse and a banana peel.

#quest.formatobjects# is similar to this but adds in the default text formatting,
ie: a small dog, a brown shoe, a rotting corpse and a banana peel.

Now currently in QuestNet, since players are objects they are added to the list of objects in the current room. But to say move them from this list and reformat the #quest.objects# or #quest.formatobjects# you have to write quite the piece of code. Something like...


for each object in <#quest.currentroom#> if property <#quest.thing#; player> then {
set numeric <player.location; $instr(#quest.objects#; #quest.thing#)$>
set numeric <player.end; $lengthof(#quest.thing#)$ + %player.location%>
set string <object.format.left; $left(#quest.objects#;%player.location%)$>
set string <object.format.right; $right(#quest.objects#; %player.end%)$>
set string <format.objects; #object.format.right# #object.format.left#>
}


That would filter out the players and make the #quest.objects# variable look right to be displayed in the room description, off the top of my head. I have a piece of code around here that would do it too and is complete because it checks how many player objects are in the room and adds their name to a list called #quest.players#, but my pc keeps crashing and I lose everything so I'm not worrying about find it now.

Now that's a lot of work for a novice asl user and it would be much easier to have a simple #quest.players# and #quest.formatplayers# built in string variable.