Weapons: Difference between revisions

From Valve Developer Community
Jump to navigation Jump to search
mNo edit summary
(Added dynamic spawns and customizing weapons.)
Line 1: Line 1:
{{Abstract Mapping}}
{{Abstract Mapping}}
==Adding weapons to a map==
:1. Making [[point entity]] with [[Classname]] [[:Category:weapons|weapon_...]] (For example: [[weapon_ak47]], [[weapon_portalgun]]...)
:1. Making [[point entity]] with [[Classname]] [[:Category:weapons|weapon_...]] (For example: [[weapon_ak47]], [[weapon_portalgun]]...)


Line 5: Line 6:


You first weapon is done!
You first weapon is done!
==Dynamic Spawns==
Using [[env_entity_maker]], [[logic_relay]], and [[point_template]] you can spawn weapons into the map.
===Example===
*[[weapon_shotgun]] named ''"spawnedweapon"''
*[[point_template]] named ''"weapontemplate"'' with ''"template01"'' set to ''"spawnedweapon"''.
*[[env_entity_maker]] ''"weapontemplate"'' as ''entitytemplate''.
*[[logic_relay]] to call <code>forcespawn</code> on '''env_entity_maker''' to spawn in weapon.
Depending on need, you can use Flags "Start constrained" or "Deny player pickup" to control weapon after spawning.
==Customizing Weapons==
With the entity [[point_clientcommand]] and <code>sv_cheats 1</code> you can modify parameters for weapons. (ex: <code>"sk_plr_dmg_pistol 100"</code>)


==See also==
==See also==
[[:Category:Weapons]]
[[:Category:Weapons]]

Revision as of 21:27, 11 March 2025

Abstract Mapping series Discuss your thoughts - Help us develop the articles or ideas you want

Ammunition | List of HL2 Animals and Creatures | Mapping with Antlions | Beams and Lasers | Cables and Ropes | Moving Clouds | Color Theory in Level Design | Combat | Combine | Compression (Source 1) | Doors | Dust, Fog, & Smoke | Elevators | Level Transitions | Environmental Lighting, Sun, Weather, & Outdoors | Explosions | Fire | Half-Life 2 Foliage | Glass & Windows | Headcrab | Health | Ladders | Lighting | Optimization (level design) | Physics | Retinal scanners | Sound and Music | Special effects | Terrain | Trains | Turrets | Water | Weapons | Zombie

Adding weapons to a map

1. Making point entity with Classname weapon_... (For example: weapon_ak47, weapon_portalgun...)
2. Set you need keyvalues (For example:targetname, rendermode...)

You first weapon is done!

Dynamic Spawns

Using env_entity_maker, logic_relay, and point_template you can spawn weapons into the map.

Example

Depending on need, you can use Flags "Start constrained" or "Deny player pickup" to control weapon after spawning.

Customizing Weapons

With the entity point_clientcommand and sv_cheats 1 you can modify parameters for weapons. (ex: "sk_plr_dmg_pistol 100")

See also

Category:Weapons