Black Mesa

Black Mesa

Not enough ratings
Making aliens spawn in portals
By DerpyDoo
Learn how to make aliens spawn into the map from a portal and how you can use it.
   
Award
Favorite
Favorited
Unfavorite
How to create the portal.
Click on the entity tool (looks like a lightbulb on the left).
Create an entity by clicking on the map.
Right click the entity and click properties.
in the "class" section search for "env_xen_portal".
Click apply and you now have a portal!

Adding an NPC to the portal.
Ok so now you have a Portal but nothing is going to come out of it so let's fix that.

Right click on your portal and click on properties.
Click on "Class name of spawned NPC" and then click on the drop down menu.
Select which NPC you want to spawn.
If you want multiple NPCs to spawn then click on "Num. of NPCs" and "Frequency" to set how quickly they spawn.
Now be sure to give this entity a name as you will need it in the next section.

If you have a human character come through then you can select "Weapons" to give them a weapon.

You can also change the portal size by click on "Portal size"
Making them spawn in game.
If you want the NPC to spawn as soon as the game loads then click on "Start disabled" and change it to "No".

If you want the NPC to spawn after a button is pressed or when the player enters the room then read on.

Click on the "Block Tool" and make the texture "Tools/toolstrigger" it will look like an orange box with the word "TRIGGER" in it.
Create a block with this texture that covers the area in which you want the player to walk into, be sure to make it big enough that the player cannot jump over it or walk around it.
Next click on the block and press "Ctrl + T" to open up the properties for it.
Under "Class" select "Trigger_Once" and click "Apply".

Great! now you have a trigger and a portal but they need to be linked.

Bring up the properties of your Trigger and click on the "Outputs" tab.
Click "Add..."
Click on the drop down menu for "My output named" and select "OnStartTouch"
Click on the drop down menu for "Targets entities named" and Select your portals name (this is why we needed to name it)
Click on the drop down menu for "Via this input" and select "Enable"
Now click apply and you're done!

If you wanted them to spawn because of a button press or because of some other action then it's the same principle but place the output on the button or whatever other means you want them to spawn by.

Tips and tricks
This section is for those who are new to map making or at least new to enemy placement.
Here are some tips to help you make a good map.

Tip 1: The first enemy who spawns this way should be in direct view of the player. This is so the player knows that enemies can spawn this way and so they can associate the sound of the portal to an enemy spawning in.

For example:

Player walks into a room and an easy to kill enemy (headcrab would be best) spawns in the middle of the room, the player may take damage because of the shock of having an enemy spawn right in front of them but it won't be a lot of damage and the headcrab is easilly killed. Now though the player knows that enemies can spawn from anywhere and the next time they hear that sound they will immediately turn to face the source.

So from then on you can place the portals behind the player to scare them. You may be thinking "But everybody knows this" we know it because we played the game but newbies won't know that so you should always keep in mind that newbies may be playing.



Tip 2: Don't overdo it.

It's easy to go ham and throw a bunch of spawning enemies on the player every 5 seconds but at that point it becomes boring, use the shock of a spawning enemy to your advantage. Have some normal enemies like marines who don't spawn in and then while the player is fighting the marines have an alien grunt or vortigaunt spawn in behind the player, just one. To keep the player on their toes.

Or a personal favourite of mine... Have the player navigate a room of tripwires for turrets and then when they are close to getting out have a headcrab spawn right next to a tripwire scaring the player half to death thinking it will trip the sensors.

Tip 3:
Test your map on hard difficulty.

A lot of people test the map on easy, think the enemies are too easy to kill and so throws loads of them into the map making it hard to beat even on easy. This makes it nearly impossible on normal or hard and makes the game less fun for those that aren't into rage inducing difficulty.

This way if you make the map on hard and end up making the map difficult then there is always the option of easy mode for new players.

That's about it! Go out there and make some aliens spawn!

1 Comments
Kesike 14 Jul, 2020 @ 6:28am 
Thanks! Good to know!