Tutorial: The Shrinking Effect Last edited 1 year ago2022-09-01 12:42:50 UTC

Download attachment

The MINIMICUS Shrink Effect

If you have played the MINIMICUS mod then you have experienced the shrink machine.

You might have wondered how the effect of shrinking the player was achieved. You may be surprised to discover that there is no coding involved and it is actually quite an easy mapping technique.

This tutorial will show you how it's done.

You should have a working knowledge of Worldcraft/Hammer, and be proficient in the use of the trigger_teleport entity.

The Shrinking Principle

The basic idea behind shrinking is the player gets teleported between two nearly-identical rooms. The only difference is that one of the rooms is scaled 3 times larger than the other.

There isn't much else to it, except for a few logical aspects that you might want to include. But I'll get to that later. On paper this tutorial can look very confusing, so I've included an example map for you. Hopefully it will help clarify the placement of everything.

Setting It Up

We start by making the room where the player will be normal size. Don't make the outer dimensions of this room too large, you want to leave plenty of space on the grid for a much larger version of this room which will be added later. When this first room is complete, we will copy it and scale it up by 3 to make the room where the player will appear to be small.

For now, make a simple room, with just an info_player_start. In MINIMICUS, the machine itself is just a hallway with a big doorway at one end and a tiny doorway at the other. The shrinking machine could be any number of configurations once you know the mechanics.

For this example, lets stick with the familiar and form a hallway at one end of the room. Make a normal sized door on one end of the hall and a small sized door on the other. A good visual cue for this is to use the info_player_start entity as a guideline.

The small door should be slightly narrower and about half the height of the info_player_start.

The normal sized door should have a high step and the smaller door should be small enough that the player cannot crouch and get through. This is one of the logical aspects I mentioned earlier. The main thing to remember here is you want the player to access the shrink machine from only one direction in each room. In other words, when the player is normal-sized he should not be able to fit through the tiny door. When he is small, he should not be able to climb through the larger door.

Otherwise, in-game it would seem that the player could shrink repeatedly, getting smaller and smaller when actually this would not be the case and would give undesirable results. Another thing to think about is how the player will enter and exit the room? You want to set everything up well in this first room because once you copy and scale the room, anything you add will need to be done to both rooms.

Go ahead and add any detail you would like to have in the room including furniture, signs, light fixtures, etc. and finish texturing everything.

I can't stress enough that it is much easier to complete the room BEFORE we copy it and THEN scale it up. Along those lines, I found that using only textured lighting works very well in this scenario. When the room is scaled up, the textured lighting is automatically scaled and both rooms are lit identically with no trouble at all.

On the other hand, entity-based lighting does not automatically scale and will be a royal pain in the butt to tweak later. It will be nearly impossible to make entity-based lighting look the same in both rooms.

Now that the first room is finished, the next step is to create the second room where the player will appear to be small. Make sure your texture-lock button is activated. Select the entire room and do a copy and paste. While the entire second room is still selected, use the transform tool (Ctrl + M) to scale it up by 3 on all three axes.

Do this by ticking scale and putting a 3 in the x,y, and z fields. Move the larger room as necessary to make sure it doesn't overlap the smaller room in any of the views. It is a good idea to do a check-for-problems (Alt + P) and a test compile now to be sure your map is problem free.

Use the noclip console command to get from room to room in order to see what you have done so far. For future reference I will refer to the first (smaller) room as Room1 and the second (larger) room as Room2.

Adding the Magic

Now we are ready to place the trigger_teleports that will seamlessly move us from one room to the other. Place a trigger_teleport in the hallway of Room1 and it's info_teleport_destination in the same relative spot in Room2.

The angle of the info_teleport destination in Room2 should be pointing towards the tiny door. Now place a trigger_teleport in the hallway of Room2 and it's info_teleport_destination in the same relative spot in the Room1. The angle of the info_teleport_destination in Room1 should be pointing towards the large door.

In each hallway make sure that the info_teleport_destination has a little distance from the trigger_teleport so that the player will not spawn right into the trigger_teleport. Compile your map and give it a try. If everything is placed correctly, you should be able to shrink and grow as you please by going back and forth through the hallway.

Enhancing the Effect

The only thing missing now is the special effects that happen during the teleport. You can set this up any way you see fit, make it as simple or as complicated as your experience level will allow. I used env_sprites to mark the area where the 'shrinking' would happen.

Just place the same env_sprite in both rooms and scale it up in Room2. You'll need to adjust the scale of the sprite to your liking, I found that the room2 sprite only needs to be twice as big as the room1 sprite. In MINIMICUS, there is a trigger_multiple right in front of each trigger_teleport which sets off a multimanager that calls an env_fade and an ambient_generic sound whenever the player goes through the shrinker. I've included this feature in the example map.
Loading embedded content: Vault Item #163
Loading embedded content: Vault Item #3285


You must log in to post a comment. You can login or register a new account.