📄 player.htm
字号:
<a href="qc-types.htm#void">void</a>() <b>player_axec4</b><a name="player_axec4">=</a> [$axattc4, <a href="player.htm#player_run">player_run</a> ] {<a href="qc-glob.htm#self">self</a>.<a href="qc-enty.htm#dot_weaponframe">weaponframe</a>=4;};
<a href="qc-types.htm#void">void</a>() <b>player_axed1</b><a name="player_axed1">=</a> [$axattd1, player_axed2 ] {<a href="qc-glob.htm#self">self</a>.<a href="qc-enty.htm#dot_weaponframe">weaponframe</a>=5;};
<a href="qc-types.htm#void">void</a>() <b>player_axed2</b><a name="player_axed2">=</a> [$axattd2, player_axed3 ] {<a href="qc-glob.htm#self">self</a>.<a href="qc-enty.htm#dot_weaponframe">weaponframe</a>=6;};
<a href="qc-types.htm#void">void</a>() <b>player_axed3</b><a name="player_axed3">=</a> [$axattd3, player_axed4 ] {<a href="qc-glob.htm#self">self</a>.<a href="qc-enty.htm#dot_weaponframe">weaponframe</a>=7;<a href="weapons.htm#W_FireAxe">W_FireAxe</a>();};
<a href="qc-types.htm#void">void</a>() <b>player_axed4</b><a name="player_axed4">=</a> [$axattd4, <a href="player.htm#player_run">player_run</a> ] {<a href="qc-glob.htm#self">self</a>.<a href="qc-enty.htm#dot_weaponframe">weaponframe</a>=8;};
<i>//============================================================================</i>
<a href="qc-types.htm#void">void</a>() <b>player_nail1</b><a name="player_nail1">=</a>[$nailatt1, player_nail2 ]
{
<a href="qc-glob.htm#self">self</a>.<a href="qc-enty.htm#dot_effects">effects</a> = <a href="qc-glob.htm#self">self</a>.<a href="qc-enty.htm#dot_effects">effects</a> | <a href="qc-defs.htm#EF_MUZZLEFLASH">EF_MUZZLEFLASH</a>;
<b>if</b> (!<a href="qc-glob.htm#self">self</a>.<a href="qc-enty.htm#dot_button0">button0</a>)
{<a href="player.htm#player_run">player_run</a> ();<b>return</b>;}
<a href="qc-glob.htm#self">self</a>.<a href="qc-enty.htm#dot_weaponframe">weaponframe</a> = <a href="qc-glob.htm#self">self</a>.<a href="qc-enty.htm#dot_weaponframe">weaponframe</a> + 1;
<b>if</b> (<a href="qc-glob.htm#self">self</a>.<a href="qc-enty.htm#dot_weaponframe">weaponframe</a> == 9)
<a href="qc-glob.htm#self">self</a>.<a href="qc-enty.htm#dot_weaponframe">weaponframe</a> = 1;
<a href="weapons.htm#SuperDamageSound">SuperDamageSound</a>();
<a href="weapons.htm#W_FireSpikes">W_FireSpikes</a> (4);
<a href="qc-glob.htm#self">self</a>.<a href="qc-enty.htm#dot_attack_finished">attack_finished</a> = <a href="qc-glob.htm#time">time</a> + 0.2;
};
<a href="qc-types.htm#void">void</a>() <b>player_nail2</b><a name="player_nail2">=</a>[$nailatt2, <a href="player.htm#player_nail1">player_nail1</a> ]
{
<a href="qc-glob.htm#self">self</a>.<a href="qc-enty.htm#dot_effects">effects</a> = <a href="qc-glob.htm#self">self</a>.<a href="qc-enty.htm#dot_effects">effects</a> | <a href="qc-defs.htm#EF_MUZZLEFLASH">EF_MUZZLEFLASH</a>;
<b>if</b> (!<a href="qc-glob.htm#self">self</a>.<a href="qc-enty.htm#dot_button0">button0</a>)
{<a href="player.htm#player_run">player_run</a> ();<b>return</b>;}
<a href="qc-glob.htm#self">self</a>.<a href="qc-enty.htm#dot_weaponframe">weaponframe</a> = <a href="qc-glob.htm#self">self</a>.<a href="qc-enty.htm#dot_weaponframe">weaponframe</a> + 1;
<b>if</b> (<a href="qc-glob.htm#self">self</a>.<a href="qc-enty.htm#dot_weaponframe">weaponframe</a> == 9)
<a href="qc-glob.htm#self">self</a>.<a href="qc-enty.htm#dot_weaponframe">weaponframe</a> = 1;
<a href="weapons.htm#SuperDamageSound">SuperDamageSound</a>();
<a href="weapons.htm#W_FireSpikes">W_FireSpikes</a> (-4);
<a href="qc-glob.htm#self">self</a>.<a href="qc-enty.htm#dot_attack_finished">attack_finished</a> = <a href="qc-glob.htm#time">time</a> + 0.2;
};
<i>//============================================================================</i>
<a href="qc-types.htm#void">void</a>() <b>player_light1</b><a name="player_light1">=</a>[$light1, player_light2 ]
{
<a href="qc-glob.htm#self">self</a>.<a href="qc-enty.htm#dot_effects">effects</a> = <a href="qc-glob.htm#self">self</a>.<a href="qc-enty.htm#dot_effects">effects</a> | <a href="qc-defs.htm#EF_MUZZLEFLASH">EF_MUZZLEFLASH</a>;
<b>if</b> (!<a href="qc-glob.htm#self">self</a>.<a href="qc-enty.htm#dot_button0">button0</a>)
{<a href="player.htm#player_run">player_run</a> ();<b>return</b>;}
<a href="qc-glob.htm#self">self</a>.<a href="qc-enty.htm#dot_weaponframe">weaponframe</a> = <a href="qc-glob.htm#self">self</a>.<a href="qc-enty.htm#dot_weaponframe">weaponframe</a> + 1;
<b>if</b> (<a href="qc-glob.htm#self">self</a>.<a href="qc-enty.htm#dot_weaponframe">weaponframe</a> == 5)
<a href="qc-glob.htm#self">self</a>.<a href="qc-enty.htm#dot_weaponframe">weaponframe</a> = 1;
<a href="weapons.htm#SuperDamageSound">SuperDamageSound</a>();
<a href="weapons.htm#W_FireLightning">W_FireLightning</a>();
<a href="qc-glob.htm#self">self</a>.<a href="qc-enty.htm#dot_attack_finished">attack_finished</a> = <a href="qc-glob.htm#time">time</a> + 0.2;
};
<a href="qc-types.htm#void">void</a>() <b>player_light2</b><a name="player_light2">=</a>[$light2, <a href="player.htm#player_light1">player_light1</a> ]
{
<a href="qc-glob.htm#self">self</a>.<a href="qc-enty.htm#dot_effects">effects</a> = <a href="qc-glob.htm#self">self</a>.<a href="qc-enty.htm#dot_effects">effects</a> | <a href="qc-defs.htm#EF_MUZZLEFLASH">EF_MUZZLEFLASH</a>;
<b>if</b> (!<a href="qc-glob.htm#self">self</a>.<a href="qc-enty.htm#dot_button0">button0</a>)
{<a href="player.htm#player_run">player_run</a> ();<b>return</b>;}
<a href="qc-glob.htm#self">self</a>.<a href="qc-enty.htm#dot_weaponframe">weaponframe</a> = <a href="qc-glob.htm#self">self</a>.<a href="qc-enty.htm#dot_weaponframe">weaponframe</a> + 1;
<b>if</b> (<a href="qc-glob.htm#self">self</a>.<a href="qc-enty.htm#dot_weaponframe">weaponframe</a> == 5)
<a href="qc-glob.htm#self">self</a>.<a href="qc-enty.htm#dot_weaponframe">weaponframe</a> = 1;
<a href="weapons.htm#SuperDamageSound">SuperDamageSound</a>();
<a href="weapons.htm#W_FireLightning">W_FireLightning</a>();
<a href="qc-glob.htm#self">self</a>.<a href="qc-enty.htm#dot_attack_finished">attack_finished</a> = <a href="qc-glob.htm#time">time</a> + 0.2;
};
<i>//============================================================================</i>
<a href="qc-types.htm#void">void</a>() <b>player_rocket1</b><a name="player_rocket1">=</a>[$rockatt1, player_rocket2 ] {<a href="qc-glob.htm#self">self</a>.<a href="qc-enty.htm#dot_weaponframe">weaponframe</a>=1;
<a href="qc-glob.htm#self">self</a>.<a href="qc-enty.htm#dot_effects">effects</a> = <a href="qc-glob.htm#self">self</a>.<a href="qc-enty.htm#dot_effects">effects</a> | <a href="qc-defs.htm#EF_MUZZLEFLASH">EF_MUZZLEFLASH</a>;};
<a href="qc-types.htm#void">void</a>() <b>player_rocket2</b><a name="player_rocket2">=</a>[$rockatt2, player_rocket3 ] {<a href="qc-glob.htm#self">self</a>.<a href="qc-enty.htm#dot_weaponframe">weaponframe</a>=2;};
<a href="qc-types.htm#void">void</a>() <b>player_rocket3</b><a name="player_rocket3">=</a>[$rockatt3, player_rocket4 ] {<a href="qc-glob.htm#self">self</a>.<a href="qc-enty.htm#dot_weaponframe">weaponframe</a>=3;};
<a href="qc-types.htm#void">void</a>() <b>player_rocket4</b><a name="player_rocket4">=</a>[$rockatt4, player_rocket5 ] {<a href="qc-glob.htm#self">self</a>.<a href="qc-enty.htm#dot_weaponframe">weaponframe</a>=4;};
<a href="qc-types.htm#void">void</a>() <b>player_rocket5</b><a name="player_rocket5">=</a>[$rockatt5, player_rocket6 ] {<a href="qc-glob.htm#self">self</a>.<a href="qc-enty.htm#dot_weaponframe">weaponframe</a>=5;};
<a href="qc-types.htm#void">void</a>() <b>player_rocket6</b><a name="player_rocket6">=</a>[$rockatt6, <a href="player.htm#player_run">player_run</a> ] {<a href="qc-glob.htm#self">self</a>.<a href="qc-enty.htm#dot_weaponframe">weaponframe</a>=6;};
<a href="qc-types.htm#void">void</a>(<a href="qc-types.htm#float">float</a> num_bubbles) <a href="player.htm#DeathBubbles">DeathBubbles</a>;
<a href="qc-types.htm#void">void</a>() <b>PainSound</b><a name="PainSound">=</a>
{
<b>local</b> <a href="qc-types.htm#float">float</a> rs;
<b>if</b> (<a href="qc-glob.htm#self">self</a>.<a href="qc-enty.htm#dot_health">health</a> < 0)
<b>return</b>;
<b>if</b> (<a href="defs.htm#damage_attacker">damage_attacker</a>.<a href="qc-enty.htm#dot_classname">classname</a> == <b>"teledeath"</b>)
{
<a href="qc-built.htm#sound">sound</a> (<a href="qc-glob.htm#self">self</a>, <a href="qc-defs.htm#CHAN_VOICE">CHAN_VOICE</a>, <b>"player/teledth1.wav"</b>, 1, <a href="qc-defs.htm#ATTN_NONE">ATTN_NONE</a>);
<b>return</b>;
}
<i>// water pain sounds</i>
<b>if</b> (<a href="qc-glob.htm#self">self</a>.<a href="qc-enty.htm#dot_watertype">watertype</a> == <a href="qc-defs.htm#CONTENT_WATER">CONTENT_WATER</a> && <a href="qc-glob.htm#self">self</a>.<a href="qc-enty.htm#dot_waterlevel">waterlevel</a> == 3)
{
<a href="player.htm#DeathBubbles">DeathBubbles</a>(1);
<b>if</b> (<a href="qc-built.htm#random">random</a>() > 0.5)
<a href="qc-built.htm#sound">sound</a> (<a href="qc-glob.htm#self">self</a>, <a href="qc-defs.htm#CHAN_VOICE">CHAN_VOICE</a>, <b>"player/drown1.wav"</b>, 1, <a href="qc-defs.htm#ATTN_NORM">ATTN_NORM</a>);
<b>else</b>
<a href="qc-built.htm#sound">sound</a> (<a href="qc-glob.htm#self">self</a>, <a href="qc-defs.htm#CHAN_VOICE">CHAN_VOICE</a>, <b>"player/drown2.wav"</b>, 1, <a href="qc-defs.htm#ATTN_NORM">ATTN_NORM</a>);
<b>return</b>;
}
<i>// slime pain sounds</i>
<b>if</b> (<a href="qc-glob.htm#self">self</a>.<a href="qc-enty.htm#dot_watertype">watertype</a> == <a href="qc-defs.htm#CONTENT_SLIME">CONTENT_SLIME</a>)
{
<i>// FIX ME put in some steam here</i>
<b>if</b> (<a href="qc-built.htm#random">random</a>() > 0.5)
<a href="qc-built.htm#sound">sound</a> (<a href="qc-glob.htm#self">self</a>, <a href="qc-defs.htm#CHAN_VOICE">CHAN_VOICE</a>, <b>"player/lburn1.wav"</b>, 1, <a href="qc-defs.htm#ATTN_NORM">ATTN_NORM</a>);
<b>else</b>
<a href="qc-built.htm#sound">sound</a> (<a href="qc-glob.htm#self">self</a>, <a href="qc-defs.htm#CHAN_VOICE">CHAN_VOICE</a>, <b>"player/lburn2.wav"</b>, 1, <a href="qc-defs.htm#ATTN_NORM">ATTN_NORM</a>);
<b>return</b>;
}
<b>if</b> (<a href="qc-glob.htm#self">self</a>.<a href="qc-enty.htm#dot_watertype">watertype</a> == <a href="qc-defs.htm#CONTENT_LAVA">CONTENT_LAVA</a>)
{
<b>if</b> (<a href="qc-built.htm#random">random</a>() > 0.5)
<a href="qc-built.htm#sound">sound</a> (<a href="qc-glob.htm#self">self</a>, <a href="qc-defs.htm#CHAN_VOICE">CHAN_VOICE</a>, <b>"player/lburn1.wav"</b>, 1, <a href="qc-defs.htm#ATTN_NORM">ATTN_NORM</a>);
<b>else</b>
<a href="qc-built.htm#sound">sound</a> (<a href="qc-glob.htm#self">self</a>, <a href="qc-defs.htm#CHAN_VOICE">CHAN_VOICE</a>, <b>"player/lburn2.wav"</b>, 1, <a href="qc-defs.htm#ATTN_NORM">ATTN_NORM</a>);
<b>return</b>;
}
<b>if</b> (<a href="qc-glob.htm#self">self</a>.<a href="qc-enty.htm#dot_pain_finished">pain_finished</a> > <a href="qc-glob.htm#time">time</a>)
{
<a href="qc-glob.htm#self">self</a>.<a href="qc-enty.htm#dot_axhitme">axhitme</a> = 0;
<b>return</b>;
}
<a href="qc-glob.htm#self">self</a>.<a href="qc-enty.htm#dot_pain_finished">pain_finished</a> = <a href="qc-glob.htm#time">time</a> + 0.5;
<i>// don't make multiple pain sounds right after each other</i>
<i>// ax pain sound</i>
<b>if</b> (<a href="qc-glob.htm#self">self</a>.<a href="qc-enty.htm#dot_axhitme">axhitme</a> == 1)
{
<a href="qc-glob.htm#self">self</a>.<a href="qc-enty.htm#dot_axhitme">axhitme</a> = 0;
<a href="qc-built.htm#sound">sound</a> (<a href="qc-glob.htm#self">self</a>, <a href="qc-defs.htm#CHAN_VOICE">CHAN_VOICE</a>, <b>"player/axhit1.wav"</b>, 1, <a href="qc-defs.htm#ATTN_NORM">ATTN_NORM</a>);
<b>return</b>;
}
rs = <a href="qc-built.htm#rint">rint</a>((<a href="qc-built.htm#random">random</a>() * 5) + 1);
<a href="qc-glob.htm#self">self</a>.<a href="qc-enty.htm#dot_noise">noise</a> = <b>""</b>;
<b>if</b> (rs == 1)
<a href="qc-glob.htm#self">self</a>.<a href="qc-enty.htm#dot_noise">noise</a> = <b>"player/pain1.wav"</b>;
<b>else</b> <b>if</b> (rs == 2)
<a href="qc-glob.htm#self">self</a>.<a href="qc-enty.htm#dot_noise">noise</a> = <b>"player/pain2.wav"</b>;
<b>else</b> <b>if</b> (rs == 3)
<a href="qc-glob.htm#self">self</a>.<a href="qc-enty.htm#dot_noise">noise</a> = <b>"player/pain3.wav"</b>;
<b>else</b> <b>if</b> (rs == 4)
<a href="qc-glob.htm#self">self</a>.<a href="qc-enty.htm#dot_noise">noise</a> = <b>"player/pain4.wav"</b>;
<b>else</b> <b>if</b> (rs == 5)
<a href="qc-glob.htm#self">self</a>.<a href="qc-enty.htm#dot_noise">noise</a> = <b>"player/pain5.wav"</b>;
<b>else</b>
<a href="qc-glob.htm#self">self</a>.<a href="qc-enty.htm#dot_noise">noise</a> = <b>"player/pain6.wav"</b>;
<a href="qc-built.htm#sound">sound</a> (<a href="qc-glob.htm#self">self</a>, <a href="qc-defs.htm#CHAN_VOICE">CHAN_VOICE</a>, <a href="qc-glob.htm#self">self</a>.<a href="qc-enty.htm#dot_noise">noise</a>, 1, <a href="qc-defs.htm#ATTN_NORM">ATTN_NORM</a>);
<b>return</b>;
};
<a href="qc-types.htm#void">void</a>() <b>player_pain1</b><a name="player_pain1">=</a> [ $pain1, player_pain2 ] {<a href="player.htm#PainSound">PainSound</a>();<a href="qc-glob.htm#self">self</a>.<a href="qc-enty.htm#dot_weaponframe">weaponframe</a>=0;};
<a href="qc-types.htm#void">void</a>() <b>player_pain2</b><a name="player_pain2">=</a> [ $pain2, player_pain3 ] {};
<a href="qc-types.htm#void">void</a>() <b>player_pain3</b><a name="player_pain3">=</a> [ $pain3, player_pain4 ] {};
<a href="qc-types.htm#void">void</a>() <b>player_pain4</b><a name="player_pain4">=</a> [ $pain4, player_pain5 ] {};
<a href="qc-types.htm#void">void</a>() <b>player_pain5</b><a name="player_pain5">=</a> [ $pain5, player_pain6 ] {};
<a href="qc-types.htm#void">void</a>() <b>player_pain6</b><a name="player_pain6">=</a> [ $pain6, <a href="player.htm#player_run">player_run</a> ] {};
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -