Zh/Weapons: Difference between revisions

From Valve Developer Community
< Zh
Jump to navigation Jump to search
(Created page with "{{subst:#if: Translation of 'Weapons' to '中文' via Template:LanguageBar buttons * * * * * * * * * * * * * * * * * * * * * * * * * * * *...")
 
mNo edit summary
 
(14 intermediate revisions by 2 users not shown)
Line 1: Line 1:
{{subst:#if:|||{{LAuto/t}}
{{LanguageBar|title = 武器}}
{{Abstract Mapping:zh-cn}}
==在地图上添加武器==
:1. 创建带有 {{L|Classname|类名}} {{LCategory|weapons|weapon_...}} 的 {{L|point entity|点实体}} 。(例如: {{L|weapon_ak47}}, {{L|weapon_portalgun}}...)


--- DON'T JUST BLINDLY DELETE THIS PART. DO REPLACE THE LINKS AND CATEGORIES. THE PICTURE SHOWS HOW TO USE IT ! ---
:2. 设置所需的 {{L|keyvalues|键值}} 。(例如:{{L|targetname}}, [[L|rendermode}}...)


SEARCH FOR:
你的第一件武器完成了!
\[\[(?!#|File(?:[ _]talk)?:|Image(?:[ _]talk)?:|Media:|Template(?:[ _]talk)?:|MediaWiki(?:[ _]talk)?:|Talk:|Category[ _]talk:|Project[ _]talk:|Valve[ _]Developer[ _]Community[ _]talk:|Help[ _]talk:|User(?:[ _]talk)?:|c:|commons:|Dictionary:|Google:|GoogleGroups:|IMDB:|M:|Meta:|Metawikipedia:|MW:|SdkBug:|SourceForge:|Steampowered:|W:|Wiki:|WikiBooks:|Wikipedia:|Wikiquote:|Wiktionary:|WP:)(:?(?:Category|Category|Help|Project|Valve[ _]Developer[ _]Community|Special|)(?:[^\|\]]+))(\|?.*?)\]\]


REPLACE WITH:
==动态生成==
{{subst:LAuto|$1$2}}
使用 {{L|env_entity_maker}},{{L|logic_relay}},还有 {{L|point_template}} 以在你的地图中生成武器。


}}{{wip}}{{translating}}
===示例===
{{LanguageBar}}
*把 {{L|weapon_shotgun}} 命名为 ''"spawnedweapon"''。
{{Abstract Mapping}}
*把 {{L|point_template}} 命名为 ''"weapontemplate"'' ,其中 ''"template01"'' 设为 ''"spawnedweapon"''。
==Adding weapons to a map==
*把 {{L|env_entity_maker}} 的 ''"entitytemplate"'' 设为 '''weaponTemplate''' 。
:1. Making [[point entity]] with [[Classname]] [[:Category:weapons|weapon_...]] (For example: [[weapon_ak47]], [[weapon_portalgun]]...)
*{{L|logic_relay}} 调用 '''env_entity_maker''' 里的 <code>forcespawn</code>  生成武器。


:2. Set you need [[keyvalues]] (For example:[[targetname]], [[rendermode]]...)
根据需要,你可以使用flags "Start constrained" 或者 "Deny player pickup" 来控制生成后的武器。


You first weapon is done!
==自定义武器==
通过 {{L|point_clientcommand}} 实体并开启 <code>sv_cheats 1</code> 可以修改武器参数。 (例如: <code>"sk_plr_dmg_pistol 100"</code>)
此操作也可通过武器脚本实现,具体方法参见 {{L|Changing clip sizes|修改弹匣容量}} 章节。


==Dynamic Spawns==
==另请参见==
Using [[env_entity_maker]], [[logic_relay]], and [[point_template]] you can spawn weapons into the map.
{{LCategory|Weapons}}
 
===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>)
This can also be done with weapon scripts. See [[Changing clip sizes]].
 
==See also==
[[:Category:Weapons]]

Latest revision as of 08:02, 24 June 2025

English (en)中文 (zh)Translate (Translate)
概括性的地图制作系列 讨论你的想法——帮助我们写你需要的文章和想法

弹药 | 生物 | 蚁狮 | 光束和激光 | 线缆与绳索 | 动态的天空与云雾 | 色彩理论 | 战斗 | 联合军 | 压缩(起源 1) | | 尘土、雾、烟 | 升降机 | 关卡转换 | 环境光效、太阳、天气、室外 | 爆炸 | 火焰 | 植被 | 玻璃和窗户 | 猎头蟹 | 生命值 | 梯子 | 光效 | 优化 | 物理 | 视网膜扫描仪 | 声效和音乐 | 特效 | 地形 | 火车 | 炮塔 | | 武器 | 僵尸

在地图上添加武器

1. 创建带有 类名(en) weapon_...(en)点实体(en) 。(例如: weapon_ak47(en), weapon_portalgun(en)...)
2. 设置所需的 键值(en) 。(例如:targetname(en), [[L|rendermode}}...)

你的第一件武器完成了!

动态生成

使用 env_entity_maker(en)logic_relay(en),还有 point_template(en) 以在你的地图中生成武器。

示例

根据需要,你可以使用flags "Start constrained" 或者 "Deny player pickup" 来控制生成后的武器。

自定义武器

通过 point_clientcommand(en) 实体并开启 sv_cheats 1 可以修改武器参数。 (例如: "sk_plr_dmg_pistol 100") 此操作也可通过武器脚本实现,具体方法参见 修改弹匣容量(en) 章节。

另请参见

Category:Weapons(en)