Author Topic: Instances (Like player homes in MMOs- built specifically for one player)  (Read 389 times)

Um yeah, I could use this.

For those who don't know, an "instance" is a private area generated for one or more players. For this occasion though, I only need it to work for one player.

It could work by giving the bricks specific names that would be called via events.

For instance (lol punnz), let's say you have a space ship that you want to be an instance. You would give each brick this name:
Code: [Select]
IN_ShipThen you would name a brick that the player would be teleported to like so:
Code: [Select]
IN_Ship_Spawn(Determined by having the prefix 'IN_Ship' and having the word 'Spawn' at the end)

Then, through events, you would do something like this:
Code: [Select]
OnActivate -> (NAMED BRICK) [IN_Ship] -> TeleportToInstance
The instance would then be generated, and the player would be teleported.

I'm not sure how you would be able to bring multiple players into an instance, nor how you would support multi-brick name events, but for now I really just need something simple.

This is a really good idea.

Though I'm not at all sure how this can be done in Blockland (or Torquescript in general), you can take the center of the "instance" some Z or X coordinates further than the original center, where the first instance is made.

Basically, when there's a space free, put it in that space. If that space is occupied, search towards the side until an empty space is found.

Pretty sure this is possible.

would probably be easiest to use onActivate > self > doPlayerTeleport [name of brick to TP to] since it won't require you to sift through lots of named bricks.

i think you can probably do something like this using a duplicator copy (e.g. like the one included with the prop tool), which then detects brick names. when you use events to generate an instance, it would prefix/append the name of the brick in the save file with the instance name.
e.g. onActivate > self > generateInstance [savename] [position to generate at] [instancename]
>> any bricks in the save named "teleport" are given the name "teleport_instancename"

if you want multiple instances without specifying the exact position of where it generates, skip that parameter and just have it autoselect positions in code.

i can probably help you out if nobody else is interested - chat me over steam.