Thursday 10 October 2013

Spawning players with specific weapons

Half Life 2 Mapping Tutorials: Spawning Players with specific weapons

This is a question which I searched for and searched for on the net but I have yet to find a tutorial based on this question:How do I make players spawn with just stunsticks and gravgun?Here I will explain how:First create a room with and place an info_player_deathmatch entity within it.  Place the entity about 32 units above the ground.  Texture the walls with the tools\nodraw texture.  Next, create a second room and texture how you like, and place aninfo_teleport_destination entity within it.  Set the name of the info_teleport_destination entity todestination01.Create a trigger_teleport brush and texture it with the tools\trigger texture, and place it under the info_player_deathmatch so that player will fall on it.  Set the remote destination name to destination01,  and set it as disabled.  Now we have a working teleport.  See below:



Now create a trigger_weaponstrip brush and texture it with the tools\trigger texture.  Place it under theinfo_player_deathmatch, but above the trigger_teleport brush, this is very important. Finally, set it to kill weaponsas shown below:EDIT: It is more advisable after evaluation to have the trigger_weaponstrip covering the player, but still above the teleport, so as to remove the weapons as quickly as possible.





Note: the teleport is needed so that players cannot walk into the trigger_weaponstrip brush and loose their weapons during the game.Next, create a game_player_equip entity and place it in the textured room.  Name it weapon01, and click smartedit.  Now your properties box should look like the one shown below, click add and put weapon_stunstick 1in the first box, then put a desired value (1) in the 2nd box and click ok. Add more weapons in the same way.



Create a trigger_multiple brush and texture it with the tools\trigger texture, and place it so that it covers theinfo_teleport_destination entity entirely.  Add an output to the trigger_multiple as layed out in the figure below:



Now go and test the map in Half Life 2 Deathmatch.

No comments:

Post a Comment