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 * * * * * * * * * * * * * * * * * * * * * * * * * * * *...")
 
No edit summary
Line 1: Line 1:
{{subst:#if:|||{{LAuto/t}}
{{LanguageBar}}
 
{{lang|LanguageBar|title =  武器}}
{{Abstract Mapping}}
<br>
--- DON'T JUST BLINDLY DELETE THIS PART. DO REPLACE THE LINKS AND CATEGORIES. THE PICTURE SHOWS HOW TO USE IT ! ---
--- DON'T JUST BLINDLY DELETE THIS PART. DO REPLACE THE LINKS AND CATEGORIES. THE PICTURE SHOWS HOW TO USE IT ! ---


Line 7: Line 9:


REPLACE WITH:
REPLACE WITH:
{{subst:LAuto|$1$2}}
{{L|$1$2}}


}}{{wip}}{{translating}}
}}{{wip}}{{translating}}
{{LanguageBar}}
{{LanguageBar}}
{{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. 创建带有 [[Classname|类名]] [[:Category:weapons|weapon_...]] 的 [[point entity|点实体]] 。(例如: [[weapon_ak47]], [[weapon_portalgun]]...)


:2. Set you need [[keyvalues]] (For example:[[targetname]], [[rendermode]]...)
:2. 设置所需的 [[keyvalues|键值]] (例如:[[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.
使用 [[env_entity_maker]][[logic_relay]],还有 [[point_template]] 以在你的地图中生成武器。


===Example===
===示例===
*[[weapon_shotgun]] named ''"spawnedweapon"''
*[[weapon_shotgun]] 命名为 ''"spawnedweapon"''
*[[point_template]] named ''"weapontemplate"'' with ''"template01"'' set to ''"spawnedweapon"''.
*[[point_template]] 命名为 ''"weapontemplate"'' ,其中 ''"template01"'' 设为 ''"spawnedweapon"''
*[[env_entity_maker]] ''"weapontemplate"'' as ''entitytemplate''.
*[[env_entity_maker]] ''"entitytemplate"'' 设为 '''weaponTemplate'''
*[[logic_relay]] to call <code>forcespawn</code> on '''env_entity_maker''' to spawn in weapon.
*[[logic_relay]] 调用 '''env_entity_maker''' 里的 <code>forcespawn</code> 生成武器。


Depending on need, you can use Flags "Start constrained" or "Deny player pickup" to control weapon after spawning.
根据需要,你可以使用flags "Start constrained" 或者 "Deny player pickup" 来控制生成后的武器。


==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>)
通过 [[point_clientcommand]] 实体并开启 <code>sv_cheats 1</code> 可以修改武器参数。 (例如: <code>"sk_plr_dmg_pistol 100"</code>)
This can also be done with weapon scripts. See [[Changing clip sizes]].
此操作也可通过武器脚本实现,具体方法参见 [[Changing clip sizes|修改弹匣容量]] 章节。


==See also==
==另请参见==
[[:Category:Weapons]]
[[:Category:Weapons|类别:武器]]

Revision as of 08:17, 22 June 2025

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

弹药 | 生物 | 蚁狮 | 光束和激光 | 线缆和绳子 | 动态的天空与云雾 | 颜色理论 | 战斗 | 联合军 | Compression (Source 1) | | 尘土、雾、烟 | 升降机 | 关卡转换 | 环境光效、太阳、天气、室外 | 爆炸 | 火焰 | 植被 | 玻璃和窗户 | Headcrab | Health | 梯子 | 光效 | 优化] | 物理 | 视网膜扫描仪 | 声效和音乐 | 特效 | 地形 | 火车 | 机枪塔 | | Weapons | 僵尸


--- DON'T JUST BLINDLY DELETE THIS PART. DO REPLACE THE LINKS AND CATEGORIES. THE PICTURE SHOWS HOW TO USE IT ! ---

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: $1$2(en)

}}

Under construction.png
This page is actively undergoing a major edit.
As a courtesy, please do not edit this while this message is displayed.
If this page has not been edited for at least several hours to a few days, please remove this template. This message is intended to help reduce edit conflicts; please remove it between editing sessions to allow others to edit the page.

The person who added this notice will be listed in its edit history should you wish to contact them.

Info content.png
This page is being translated.
You can help by finishing the translation.
If this page cannot be translated for some reason, or is left untranslated for an extended period of time after this notice is posted, the page should be requested to be deleted.
Also, please make sure the article complies with the alternate languages guide.(en)
English (en)中文 (zh)Translate (Translate)
概括性的地图制作(en)系列 讨论你的想法——帮助我们写你需要的文章和想法

弹药 | 生物 | 蚁狮 | 光束和激光 | 线缆和绳子 | 动态的天空与云雾 | 颜色理论 | 战斗 | 联合军 | Compression (Source 1) | | 尘土、雾、烟 | 升降机 | 关卡转换 | 环境光效、太阳、天气、室外 | 爆炸 | 火焰 | 植被 | 玻璃和窗户 | Headcrab | Health | 梯子 | 光效 | 优化] | 物理 | 视网膜扫描仪 | 声效和音乐 | 特效 | 地形 | 火车 | 机枪塔 | | Weapons | 僵尸

在地图上添加武器

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

你的第一件武器完成了!

动态生成

使用 env_entity_makerlogic_relay,还有 point_template 以在你的地图中生成武器。

示例

  • weapon_shotgun 命名为 "spawnedweapon"
  • point_template 命名为 "weapontemplate" ,其中 "template01" 设为 "spawnedweapon"
  • env_entity_maker"entitytemplate" 设为 weaponTemplate
  • logic_relay 调用 env_entity_maker 里的 forcespawn 生成武器。

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

自定义武器

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

另请参见

类别:武器