How do I make it so i can go somewhere specific based on what i walked into?

0 favourites
  • 13 posts
From the Asset Store
The ultimate voice pack filled with 1,536 files of .......wav and mp3 of individual numbers, letters, and words (that go
  • So I am trying to make a game, I have the work in progress out right now but it is far from what I have envision for the final product. I am trying to make a warper to warp me to specific sections of the map, on the same layout, but I don't want to make multiple teleporters. I am trying to work with only 2, a one where you walk in and it will teleport you the distance between you making it seem like you didn't teleport. I have been trying to make it work for weeks but no matter what I do I cant figure it out. this is happening in a 3d game i got it worked out with one teleporter adding the x and y to the players x and y to make it seem like there is no teleport. how would I do this with only 1 teleporter but make it so that I don't have to have 5000 lines of code to make it work with different places. using a to and from teleporter and making it so there is no determinable difference with where you came from or went to with only 2 teleporters and not have to have either 5000 teleporters or 5000 different locations it adds with what one you went into based on the variable? I don't know if this makes sense to you, but help if you can please.

  • This doesn't make much sense, probably why no one responded. You could provide an image demonstrating what you mean.

  • ok give me a sec

  • so while i try and figure out how to show a pic of what i mean could you probobly tell me what part isn't making sense? i would like to know so i can clarify. then i probobly wont have to do the picture.

  • I use teleporters with 2 values, teleport.location and teleport.target

    I give the instance variables via a family with the teleport inside.

    family: TeleporterS

    object: teleporter

    location is where the teleporter is located, target is where it's going

    if you have 2 teleport objects, give them these values:

    1.

    teleporter.location = "entry"

    teleporter.target = "nextplace"

    2.

    teleporter.location = "nextplace"

    teleporter.target = "entry"

    The following events should work for the teleports, even if you add lots more, as long as they have their own location and got another teleporter targeting it.

    conditions

    player on collision with teleporter

    pick TeleporterS where location = teleporter.target

    action

    player set position to TeleporterS

    Something along those lines

  • so while i try and figure out how to show a pic of what i mean could you probobly tell me what part isn't making sense? i would like to know so i can clarify. then i probobly wont have to do the picture.

    It's because you didn't ask how do i do a teleporter and teleport from A to B, that would be easy, you elaborated to make it sound like something different to this and I don't understand what you mean. If you share a project file or draw it then it's easier to understand what you mean, or describe the design in a better way for someone who cannot see your game.

  • Ah gotcha but the thing is, I don't want just a teleporter. a teleporter will set you to the middle of the output teleporter, no matter where you enter at. I am trying to get a code so that when you go through it your still in relatively the same spot in, say, a hallway. so, it doesn't look like you went through a teleporter, but you did and just didn't see it happen because it was so smooth

  • also DANG!!! YOU JOINED IN 2013??? damn ur a old user of this site

  • also DANG!!! YOU JOINED IN 2013??? damn ur a old user of this site

    teleport based on the x & y position of the player

    if player is at 0,0 on teleporter A

    move player to teleporter B at that same position.

    this is all theoretical, so you'll probably have to do the math yourself

  • Try Construct 3

    Develop games in your browser. Powerful, performant & highly capable.

    Try Now Construct 3 users don't see these ads
  • > also DANG!!! YOU JOINED IN 2013??? damn ur a old user of this site

    teleport based on the x & y position of the player

    if player is at 0,0 on teleporter A

    move player to teleporter B at that same position.

    this is all theoretical, so you'll probably have to do the math yourself

    if you wanted to do it the "cheat-y" and definitely horribly optimized way, you could just make multiple teleporters on one layout, and then multiple on the other layout

  • i am meaning in the same layout not different ones. i will get a video at some point but it is being a butt and not working.

  • Basic teleporter:

    construct.net/en/forum/construct-2/how-do-i-18/teleport-instance-value-170251

    Yes it is in the same layout.

Jump to:
Active Users
There are 1 visitors browsing this topic (0 users and 1 guests)