|
Axe Software Forums
Quest Developer Forum Eh, someone should know this...
|
Author | Topic: Eh, someone should know this... |
I think Im Dead |
posted 21-05-2002 04:23 BST
Ok, I realize I'm new to this, but I've been getting better today and have run into a few problems. What I'm having trouble with is this. I'm setting up a 'new account creation' type area. Commands 'set id' and 'set pw' are used and the id and pw are stored as variables and assigned to the user so they cout out "joe-user says, "I'm lame." when he talks, etc. I also have it so it takes the 'joe-user' variable and creates a room called 'joe-user-file'. I'm trying to get it so that it will also create an object called 'joe-user-pw', put the file in the corresponding room, and that object if 'looked' at would show the set password. I also had a bit of trouble with after the password had been set, I wanted the user to be pulled away to a sort of Account Admin Area. I can get them to be transfered there, but since I'm using the create room script in the QDK, I'm not sure how to define the room's alias, 'look' description, etc. I alternate back and forth using the QDK and writing some of the code, whichever proves easier for what I want done. Anyone have any pointers or ideas on this situation? Here's some of what the code looks like, maybe it will help someone help me. Nothing fancy and some of the things I have it say don't make sense, but it's just messing around at this stage. define game <Test Game> define synonyms define room <signin> I don't know if that helps at all, or confuses the situation. Hoped maybe it would shine some light on things. The room the user is sent to is titled their userid-login(it should be), but I'm curious how to customize the rooms appearance and relevant objects when the room is being created on the fly like that. Might even be shunned upon to paste code here. Sorry if it is. |
Alex |
posted 21-05-2002 18:34 BST
Interesting idea. I presume this is an online game - QuestNet server should eventually handle things such as passwords, and it already handles things like players speaking to one another (Beta 1 handles it better, although I've still not released that yet). To define things such as an alias and description for a room you've created on-the-fly in script, you need to set its properties. For example, if you've created a room "newroom", you can give it an alias with the following ASL: property <newroom; alias=The New Room> In QDK you need to select the "Change an object's (or room's) property" script command from the Objects category, enter the room name and type the "alias=..." bit in the "Property data" box. You can find out which properties have special meanings to Quest in the "Changing an Object's behaviour" section of the Quest Help, also available here: http://www.axeuk.com/quest/developer/asl/script-changeproperties.htm |
I think Im Dead |
posted 22-05-2002 04:11 BST
Thanks for the help before. It ended up working almost perfectly. Is there a command that will make a string variable case sensitive when it is defined? I've managed to make quite a few Admin-type commands and it would be nice to be able to have exactly what is defined in the variable(case sensitive, punctuation, etc.) entered as the look for a room or object. I've been using $capfirst(#variablehere#)$ for setting userid's and such, but that really doesn't work too well for room descriptions because they consist of more than one line/sentence. Would I have to do something along the lines of a #line1#, #line2#, etc. set of variables, then have all of those stored in another variable or text block then have that assigned as the room description? I don't know I've been without sleep for a while. I've probably only confused the situation. Also, would I be able to make an object called 'Admin' that held a series of administrative commands and have that given to certain users. Or similarly, a #userid#-admin object that contains a few commands to update an email address, password, and what-not. Sorry the manual is very informative, but somethings it doesn't quite cover. Or perhaps just not blatantly obvious enough for me. |
Alex |
posted 22-05-2002 13:16 BST
I don't quite understand what you mean by case-sensitivity - is Quest converting everything to lower-case? What's wrong with property <newroom; look=#somelookdescription#> ? As for an admin-type-person, my suggestion is to create your admin commands as normal commands, but have each command check that the player calling the command has the "admin" property. Players also correspond to objects - player1, player2 etc. - so you could use "property <player%userid%; admin>" to set a player up as an administrator. |
I think Im Dead |
posted 22-05-2002 20:39 BST
yeah, it's converting everything entered as the variable into lowercase and without punctuation. Even when I use the line your using there. I'm thinking it might be that when room/object properties are altered on the fly, instead of in the define section, it makes the 'look' property a response to typing that action in the room, rather than actually the <look> property in the define object(or)room section of code. Just a guess. |
Alex |
posted 22-05-2002 22:43 BST
Thanks, I'll take a look into it when I get the chance. I have a stack of things that need seeing to in Quest, and I still don't have a computer I can develop on! I have two weeks of exams, and then after that I'm free, and hopefully at that point I'll have a nice spanking new computer, so things are looking up. |