Help with making Multiplayer games

iamdaman13
I'm having trouble figuring out how to do things in Multiplayer, such as finding an if statement that checks to see if the other player is in a particular room. I read the manual, but it didn't answer all my questions specifically.
For example, lets say I wanted to have a room (room 1) with a table you could hide under. Under the table would be a seperate room (room 2) in QDT, but to the player it would be the same room, just under a table. I would want to make it where if Player 2 is in room 2, and Player 1 walks into the room 1, it displays the message "(player 1's name) has entered the room."
If someone would please make a demo multiplayer game in QDT which shows almost every possible scenario for a multiplayer RPG, both competetive and coopertive. Thanks, if someone can help me.

I think Im Dead
Um, the boards must be messing up because I posted a big reply to this. It was really short, so now I'll try and repeat it even shorter.

There's a lot of ways you could do this, but it's a bit tricky. This sort of relates to inventory rooms and objects being containers and such.

The easiest way to do this, would be to not bother with a second room for under the table, and just customize the hide command for the room containing the table, to do whatever the regular hide command would do, but add a little messaging about being under the table(if successful or spotted). Then CONCEAL the player, and they'd still see all room activity but effectively be hidden under the table.

The other way, off the top of my head, would be to have a player property "loc" and have this equal to the room containing the table, then have any and all commands or actions that would message something to the currentroom of the player(the one who enters the command not the one under the table) check each object in the game for a "loc" property equal to the currentroom and message to all objects(well player objects) found. This would effectively have them under the table, in the table room, and still recieving activity messages from the room.

Eh, that should give you some idea.

iamdaman13
Thanks! I'll try that. I'll use Conceal player when they type "hide under table", and I'll use set flag, such as under table, to "on" when they are under the table and "off" when they leave from under the table. The flag will determine the text that will be displayed for the location description. Does that make sense? I'll try it out and come back with the results. Thanks! :D

Cryophile
I would use a property rather than a flag. If you use the flag "under table" it will be turned on whenever ANY player goes under the table. You would have to make a flag for each player. If you give an under_table property to each player and turn it on/off it would work better. You might want to check for each player's property to make sure that there's only one person under the table, if you want that. So use the command "perform an action for each object in the room/game" and such.

This topic is now closed. Topics are closed after 60 days of inactivity.

Support

Forums