How to Make a Portal Launcher (Like in the game "Portal") - Difficulty: 4/10

How to Make a Portal Launcher in GKC

“This was a triumph.
I’m making a note here.
HUGE SUCCESS!”
– GLaDOS, Portal


Greetings!
Have you ever played Portal (or Portal 2)? In case you haven’t, it’s a puzzle game where you shoot portals at surfaces in order to progress through the level. There is an orange portal, and a blue one. When you walk through one, you end up on the other side. How do you create that in Gimkit? Simply follow this guide.


Supplies

You will need a few things to build this (obviously). Most parts however will be dependent on the multitude of locations for your portals. The number listed is for the example I am showing you to create, but the size for yours is completely up to you (within the memory limit).

  • x6 Text*
  • x2 Game Overlay
  • x3 Property
  • x3 Teleporter*
  • x6 Trigger*
  • x3 Props* Stone Barrier (Tall Vertical)

*Dependent on the number of possible portal locations and/or portals.


Terrain

To set this up, you will need to have terrain to show the players what they can place portals on. You can do any terrain, shape, size, etc. you want, but for mine, I made a 10x10 grid with Marble Stone (Dark) and Marble Stone (Light). Feel free to do any design you want.

The light areas are the places you can place portals and the dark ones are where you cannot.
In order for the game to know when a wall is hit, we need something to be hit and destroyed. This is where props are useful.

  1. To begin, place a prop of your choice. I’d recommend a long, narrow one (such as the Stone Barrier).
  2. You don’t want them to be easily seen by the players, and since you can’t make them invisible, make them hard to see. Set the alpha to “0.15”, which makes it difficult to see. To make it even more difficult to see, disable shadows.
  3. It needs to be able to take damage, so enable prop damage. It should only take one shot to destroy this, so change its health to 1.
  4. Rotate and scale these so that they are the same size as the light spaces and move them so they barely stick out.
  5. Mentally assign each light space a number (Position 1, Position 2, etc.). Remember these as they will be useful later.

Now that the terrain is completed, it’s time to move on to the portals, which are made from text devices.


Text Devices

  1. Place a text device into the map. Make sure it is not visible on game start. For the text to display, paste this: “⬮”
  2. Change the text size to “144” and the stroke width to 5. (The stroke color should be black).
  3. Copy this and place it next to the original. For your blue portal, I changed the hex code to “#0082FF”, but any blue works fine. For the orange one, I made the hex code “#FFB300

If all went well, you should have two text devices that look like this:

  1. Later on, we will need to hide these portals. For the orange, hide text when receiving on “Hide Orange”. For the blue, hide text when receiving on “Hide Blue”.
  2. Now, copy one of each color portal to each position. The player will need to know when a portal is placed, so we will need a system to show them. For this we will need the text devices to show. For each text devices, they should show text when receiving on “Show [Insert portal color] Position [Insert portal position number]”. Ex. “Show Orange Position 2”.

(Some portals overlap, so you can’t see them all at once in this picture.)
The player will now need to have the ability to place portals of their choice.


Placing Portals

The player will be able to choose what type of portal to place. Orange or blue. In order for them to be able to change this at any time, we will use game overlays.

Game Overlays

  1. To begin, place a game overlay. Change to overlay type to “Button”. You can change the position to any place you want, but I prefer “Bottom Right”. Make the Overlay text “Portal: :orange_circle:” so the player can see that they will place an orange portal.
  2. Change the channels to the following:
  3. Copy this game overlay. This one should not be visible on game start. Change the overlay text to “Portal: :large_blue_circle:” and the channels to the following:

You should now have two game overlays. Now we will make them change what portal a player will place.

  1. Place a property device. Change the property type to “True/False”. It’s starting value should be true. I named mine “Orange Portal”, as it will tell the game whether or not it is an orange portal. Change the property scope to “Player”.
  2. Now, place a trigger. It should not be visible in game, nor should it trigger by player collision. Add these blocks:
  3. Now make the trigger trigger when receiving on “Change portal: Blue, Change portal: orange”. This will make it trigger when either game overlay is pressed and change whether the property is true or false.

You have a system that tells the game whether the player will place a blue or orange portal. Now you need to actually place those portals.

Placing the Portals

For this part, you will need two more properties for the portals’ positions.

  1. Begin by placing a new property device. Set the property type to “Number” and make sure the default value is 0. Name it “Orange Portal Position”. Copy this and re-name the new one “Blue Portal Position”. These property devices tell the game where the portals are supposed to be.
  2. Now we need to make the portals show. To do this, place a trigger. It should not be visible in game or triggered by player collision. Add the following blocks:

    The property “Orange Portal” tells the game whether you are trying to place an orange or blue portal. The channels “Hide Orange” and “Hide Blue” will get rid of the previous portal placed, and the other channels show a specific portal in a specific position.
  3. Now wire the prop in position 1 to the trigger so that “when prop destroyed, trigger”. Note, if you want the player to be able to place a portal on a surface more than once, you’ll need to add extra props and wire each to the trigger. If you do this, I’d recommend using channels instead of wires.
  4. Copy the triggers into each other position, but change all of the ones with that position’s number (whether it is the properties’ values, or the channel names). This is what will make the portals show. You still can’t go through them yet though.

Now you need a system to allow the player to walk through one portal, and come out of the other portal.


Teleporting

“Don’t turn back, you’re nearly there!”

These are the final steps to creating a portal launcher, the actual teleporting. Many thought this would be the most difficult part. To answer that… It was quite similar (in difficulty) to the rest of this.
In Gimkit, you can’t (easily) teleport without teleporter devices.

  1. Begin by placing a teleporter device. Make sure it is not visible in-game. Make the player “Teleport here when receiving on, To Position [Insert position number]” Ex. To Position 1.
  2. Copy these teleporters to each position, changing the channel name to the current position each time.

    Now how will you make them go there? Blocks! Everybody’s favorite.
  3. Place a trigger that is not visible in game, but CAN be triggered by player collision. Set its blocks to the following, replacing the “1” with the position number that each trigger is on:

(There is a space after “To Position”)


And you’re done! Simple enough, right. How simple? I’ll let you decide.

Difficulty:

  • 0/10
  • 1/10
  • 2/10
  • 3/10
  • 4/10
  • 5/10
  • 6/10
  • 7/10
  • 8/10
  • 9/10
  • 10/10
0 voters

Thanks for reading, I hope you enjoyed! Let me know if you have any suggestions.
Fare Well…

9 Likes

Cool Guide!
People might need this for their maps

I can tell this is a cool guide just by skim reading it

I’m… amazed by this guide! I use to play portal in the xbox 360. Good job!

i love portal 10/10

Feedback:

Yay! This is great implementation. Good job!

5 Likes

OMG portals, can be useful in my next game

Great guide, thanks! :smiley:

No. Freaking. Way.
ClicClac it’s time to sacrifi-
-uhhh give your buddies the ride of a lifetime in my snack bowl!

2 Likes

Infinite fall thingy is a thing (again)
Is there a way to make it so that when you shot something, the portal opens there using blockcode?

You can probably use the lifecycle (when gadget fired) and channels to do so (sorry im not good at blockcode so I can’t give you a specific answer :sweat_smile:)

1 Like

Lol, yeah that could work.

1 Like

The game has to know where the portal hits a wall, so if a lifecycle was used, it would only know that the gadget was fired, not where it landed.

3 Likes

Bump

2 Likes

12 days later bump :skull:

1 Like

Bump!

1 Like

@FatKat I tried this, and it was pretty easy. Thanks for the guide!

1 Like

So making portal 2 or 1 in gimkit is possible? (Just realized that i replyed to the wrong message)

1 Like

Oh, my, GOSH!!! I’ve been trying to find a way to make Portal 4EVR!! THANK YOU, @FatKat! Thank you!

2 Likes

For reference, because the pictures were deleted, these are the channels referred to in the “Game Overlays” section. For step 2 the channels are:

Overlay type --> Button
Overlay Position --> Any (I chose bottom right)
When button clicked, transmit on --> Change portal: Blue
Visible on Game Start --> Yes

and for step 3 the channels are:

Overlay type --> Button
Overlay Position --> Same as before
When button clicked, transmit on --> Change portal: orange
Visible on Game Start --> No

These are the blocks referred to in step 5:

if Get Property "Orange Portal" = "true"
do Set Property "Orange Portal" Value "false"
if Get Property "Orange Portal" = "false"
do Set Property "Orange Portal" Value "true"

In “Placing the Portals” step 2, the blocks are:

if Get Property "Orange Portal" = "true"
do Set Property "Orange Portal Position" Value "1"
Broadcast Message On Channel "Hide Orange, Show Orange Position 1"
else if Get Property "Orange Portal" = "false"
do Set Property "Blue Portal Position" Value "1"
Broadcast Message On Channel "Hide Blue, Show Blue Position 1"

And finally, in “Teleporting” step 3, the blocks are:

if Get Property "Blue Portal Position" = 1
do Broadcast Message On Channel "create text with "To position " Get Property "Orange Portal Position""
if Get Property "Orange Portal Position" = 1
do Broadcast Message On Channel "create text with "To position " Get Property "Blue Portal Position""