📄 ogre.htm
字号:
<a href="qc-types.htm#void">void</a>() <b>ogre_paine12</b><a name="ogre_paine12">=</a>[ $paine12, ogre_paine13 ] {};
<a href="qc-types.htm#void">void</a>() <b>ogre_paine13</b><a name="ogre_paine13">=</a>[ $paine13, ogre_paine14 ] {};
<a href="qc-types.htm#void">void</a>() <b>ogre_paine14</b><a name="ogre_paine14">=</a>[ $paine14, ogre_paine15 ] {};
<a href="qc-types.htm#void">void</a>() <b>ogre_paine15</b><a name="ogre_paine15">=</a>[ $paine15, <a href="ogre.htm#ogre_run1">ogre_run1</a> ] {};
<a href="qc-types.htm#void">void</a>(<a href="qc-types.htm#entity">entity</a> attacker, <a href="qc-types.htm#float">float</a> damage) <b>ogre_pain</b><a name="ogre_pain">=</a>
{
<b>local</b> <a href="qc-types.htm#float">float</a> r;
<i>// don't make multiple pain sounds right after each other</i>
<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>)
<b>return</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>"ogre/ogpain1.wav"</b>, 1, <a href="qc-defs.htm#ATTN_NORM">ATTN_NORM</a>);
r = <a href="qc-built.htm#random">random</a>();
<b>if</b> (r < 0.25)
{
<a href="ogre.htm#ogre_pain1">ogre_pain1</a> ();
<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> + 1;
}
<b>else</b> <b>if</b> (r < 0.5)
{
<a href="ogre.htm#ogre_painb1">ogre_painb1</a> ();
<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> + 1;
}
<b>else</b> <b>if</b> (r < 0.75)
{
<a href="ogre.htm#ogre_painc1">ogre_painc1</a> ();
<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> + 1;
}
<b>else</b> <b>if</b> (r < 0.88)
{
<a href="ogre.htm#ogre_paind1">ogre_paind1</a> ();
<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> + 2;
}
<b>else</b>
{
<a href="ogre.htm#ogre_paine1">ogre_paine1</a> ();
<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> + 2;
}
};
<a href="qc-types.htm#void">void</a>() <b>ogre_die1</b><a name="ogre_die1">=</a>[ $death1, ogre_die2 ] {};
<a href="qc-types.htm#void">void</a>() <b>ogre_die2</b><a name="ogre_die2">=</a>[ $death2, ogre_die3 ] {};
<a href="qc-types.htm#void">void</a>() <b>ogre_die3</b><a name="ogre_die3">=</a>[ $death3, ogre_die4 ]
{<a href="qc-glob.htm#self">self</a>.<a href="qc-enty.htm#dot_solid">solid</a> = <a href="qc-defs.htm#SOLID_NOT">SOLID_NOT</a>;
<a href="qc-glob.htm#self">self</a>.<a href="qc-enty.htm#dot_ammo_rockets">ammo_rockets</a> = 2;<a href="items.htm#DropBackpack">DropBackpack</a>();};
<a href="qc-types.htm#void">void</a>() <b>ogre_die4</b><a name="ogre_die4">=</a>[ $death4, ogre_die5 ] {};
<a href="qc-types.htm#void">void</a>() <b>ogre_die5</b><a name="ogre_die5">=</a>[ $death5, ogre_die6 ] {};
<a href="qc-types.htm#void">void</a>() <b>ogre_die6</b><a name="ogre_die6">=</a>[ $death6, ogre_die7 ] {};
<a href="qc-types.htm#void">void</a>() <b>ogre_die7</b><a name="ogre_die7">=</a>[ $death7, ogre_die8 ] {};
<a href="qc-types.htm#void">void</a>() <b>ogre_die8</b><a name="ogre_die8">=</a>[ $death8, ogre_die9 ] {};
<a href="qc-types.htm#void">void</a>() <b>ogre_die9</b><a name="ogre_die9">=</a>[ $death9, ogre_die10 ] {};
<a href="qc-types.htm#void">void</a>() <b>ogre_die10</b><a name="ogre_die10">=</a>[ $death10, ogre_die11 ] {};
<a href="qc-types.htm#void">void</a>() <b>ogre_die11</b><a name="ogre_die11">=</a>[ $death11, ogre_die12 ] {};
<a href="qc-types.htm#void">void</a>() <b>ogre_die12</b><a name="ogre_die12">=</a>[ $death12, ogre_die13 ] {};
<a href="qc-types.htm#void">void</a>() <b>ogre_die13</b><a name="ogre_die13">=</a>[ $death13, ogre_die14 ] {};
<a href="qc-types.htm#void">void</a>() <b>ogre_die14</b><a name="ogre_die14">=</a>[ $death14, <a href="ogre.htm#ogre_die14">ogre_die14</a> ] {};
<a href="qc-types.htm#void">void</a>() <b>ogre_bdie1</b><a name="ogre_bdie1">=</a>[ $bdeath1, ogre_bdie2 ] {};
<a href="qc-types.htm#void">void</a>() <b>ogre_bdie2</b><a name="ogre_bdie2">=</a>[ $bdeath2, ogre_bdie3 ] {<a href="ai.htm#ai_forward">ai_forward</a>(5);};
<a href="qc-types.htm#void">void</a>() <b>ogre_bdie3</b><a name="ogre_bdie3">=</a>[ $bdeath3, ogre_bdie4 ]
{<a href="qc-glob.htm#self">self</a>.<a href="qc-enty.htm#dot_solid">solid</a> = <a href="qc-defs.htm#SOLID_NOT">SOLID_NOT</a>;
<a href="qc-glob.htm#self">self</a>.<a href="qc-enty.htm#dot_ammo_rockets">ammo_rockets</a> = 2;<a href="items.htm#DropBackpack">DropBackpack</a>();};
<a href="qc-types.htm#void">void</a>() <b>ogre_bdie4</b><a name="ogre_bdie4">=</a>[ $bdeath4, ogre_bdie5 ] {<a href="ai.htm#ai_forward">ai_forward</a>(1);};
<a href="qc-types.htm#void">void</a>() <b>ogre_bdie5</b><a name="ogre_bdie5">=</a>[ $bdeath5, ogre_bdie6 ] {<a href="ai.htm#ai_forward">ai_forward</a>(3);};
<a href="qc-types.htm#void">void</a>() <b>ogre_bdie6</b><a name="ogre_bdie6">=</a>[ $bdeath6, ogre_bdie7 ] {<a href="ai.htm#ai_forward">ai_forward</a>(7);};
<a href="qc-types.htm#void">void</a>() <b>ogre_bdie7</b><a name="ogre_bdie7">=</a>[ $bdeath7, ogre_bdie8 ] {<a href="ai.htm#ai_forward">ai_forward</a>(25);};
<a href="qc-types.htm#void">void</a>() <b>ogre_bdie8</b><a name="ogre_bdie8">=</a>[ $bdeath8, ogre_bdie9 ] {};
<a href="qc-types.htm#void">void</a>() <b>ogre_bdie9</b><a name="ogre_bdie9">=</a>[ $bdeath9, ogre_bdie10 ] {};
<a href="qc-types.htm#void">void</a>() <b>ogre_bdie10</b><a name="ogre_bdie10">=</a>[ $bdeath10, <a href="ogre.htm#ogre_bdie10">ogre_bdie10</a> ] {};
<a href="qc-types.htm#void">void</a>() <b>ogre_die</b><a name="ogre_die">=</a>
{
<i>// check for gib</i>
<b>if</b> (<a href="qc-glob.htm#self">self</a>.<a href="qc-enty.htm#dot_health">health</a> < -80)
{
<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/udeath.wav"</b>, 1, <a href="qc-defs.htm#ATTN_NORM">ATTN_NORM</a>);
<a href="player.htm#ThrowHead">ThrowHead</a> (<b>"progs/h_ogre.mdl"</b>, <a href="qc-glob.htm#self">self</a>.<a href="qc-enty.htm#dot_health">health</a>);
<a href="player.htm#ThrowGib">ThrowGib</a> (<b>"progs/gib3.mdl"</b>, <a href="qc-glob.htm#self">self</a>.<a href="qc-enty.htm#dot_health">health</a>);
<a href="player.htm#ThrowGib">ThrowGib</a> (<b>"progs/gib3.mdl"</b>, <a href="qc-glob.htm#self">self</a>.<a href="qc-enty.htm#dot_health">health</a>);
<a href="player.htm#ThrowGib">ThrowGib</a> (<b>"progs/gib3.mdl"</b>, <a href="qc-glob.htm#self">self</a>.<a href="qc-enty.htm#dot_health">health</a>);
<b>return</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>"ogre/ogdth.wav"</b>, 1, <a href="qc-defs.htm#ATTN_NORM">ATTN_NORM</a>);
<b>if</b> (<a href="qc-built.htm#random">random</a>() < 0.5)
<a href="ogre.htm#ogre_die1">ogre_die1</a> ();
<b>else</b>
<a href="ogre.htm#ogre_bdie1">ogre_bdie1</a> ();
};
<a href="qc-types.htm#void">void</a>() <b>ogre_melee</b><a name="ogre_melee">=</a>
{
<b>if</b> (<a href="qc-built.htm#random">random</a>() > 0.5)
<a href="ogre.htm#ogre_smash1">ogre_smash1</a> ();
<b>else</b>
<a href="ogre.htm#ogre_swing1">ogre_swing1</a> ();
};
<i>/*QUAKED monster_ogre (1 0 0) (-32 -32 -24) (32 32 64) Ambush
*/</i>
<a href="qc-types.htm#void">void</a>() <b>monster_ogre</b><a name="monster_ogre">=</a>
{
<b>if</b> (<a href="qc-glob.htm#deathmatch">deathmatch</a>)
{
<a href="qc-built.htm#remove">remove</a>(<a href="qc-glob.htm#self">self</a>);
<b>return</b>;
}
<a href="qc-built.htm#precache_model">precache_model</a> (<b>"progs/ogre.mdl"</b>);
<a href="qc-built.htm#precache_model">precache_model</a> (<b>"progs/h_ogre.mdl"</b>);
<a href="qc-built.htm#precache_model">precache_model</a> (<b>"progs/grenade.mdl"</b>);
<a href="qc-built.htm#precache_sound">precache_sound</a> (<b>"ogre/ogdrag.wav"</b>);
<a href="qc-built.htm#precache_sound">precache_sound</a> (<b>"ogre/ogdth.wav"</b>);
<a href="qc-built.htm#precache_sound">precache_sound</a> (<b>"ogre/ogidle.wav"</b>);
<a href="qc-built.htm#precache_sound">precache_sound</a> (<b>"ogre/ogidle2.wav"</b>);
<a href="qc-built.htm#precache_sound">precache_sound</a> (<b>"ogre/ogpain1.wav"</b>);
<a href="qc-built.htm#precache_sound">precache_sound</a> (<b>"ogre/ogsawatk.wav"</b>);
<a href="qc-built.htm#precache_sound">precache_sound</a> (<b>"ogre/ogwake.wav"</b>);
<a href="qc-glob.htm#self">self</a>.<a href="qc-enty.htm#dot_solid">solid</a> = <a href="qc-defs.htm#SOLID_SLIDEBOX">SOLID_SLIDEBOX</a>;
<a href="qc-glob.htm#self">self</a>.<a href="qc-enty.htm#dot_movetype">movetype</a> = <a href="qc-defs.htm#MOVETYPE_STEP">MOVETYPE_STEP</a>;
<a href="qc-built.htm#setmodel">setmodel</a> (<a href="qc-glob.htm#self">self</a>, <b>"progs/ogre.mdl"</b>);
<a href="qc-built.htm#setsize">setsize</a> (<a href="qc-glob.htm#self">self</a>, <a href="defs.htm#VEC_HULL2_MIN">VEC_HULL2_MIN</a>, <a href="defs.htm#VEC_HULL2_MAX">VEC_HULL2_MAX</a>);
<a href="qc-glob.htm#self">self</a>.<a href="qc-enty.htm#dot_health">health</a> = 200;
<a href="qc-glob.htm#self">self</a>.<a href="qc-enty.htm#dot_th_stand">th_stand</a> = <a href="ogre.htm#ogre_stand1">ogre_stand1</a>;
<a href="qc-glob.htm#self">self</a>.<a href="qc-enty.htm#dot_th_walk">th_walk</a> = <a href="ogre.htm#ogre_walk1">ogre_walk1</a>;
<a href="qc-glob.htm#self">self</a>.<a href="qc-enty.htm#dot_th_run">th_run</a> = <a href="ogre.htm#ogre_run1">ogre_run1</a>;
<a href="qc-glob.htm#self">self</a>.<a href="qc-enty.htm#dot_th_die">th_die</a> = <a href="ogre.htm#ogre_die">ogre_die</a>;
<a href="qc-glob.htm#self">self</a>.<a href="qc-enty.htm#dot_th_melee">th_melee</a> = <a href="ogre.htm#ogre_melee">ogre_melee</a>;
<a href="qc-glob.htm#self">self</a>.<a href="qc-enty.htm#dot_th_missile">th_missile</a> = <a href="ogre.htm#ogre_nail1">ogre_nail1</a>;
<a href="qc-glob.htm#self">self</a>.<a href="qc-enty.htm#dot_th_pain">th_pain</a> = <a href="ogre.htm#ogre_pain">ogre_pain</a>;
<a href="monsters.htm#walkmonster_start">walkmonster_start</a>();
};
<a href="qc-types.htm#void">void</a>() <b>monster_ogre_marksman</b><a name="monster_ogre_marksman">=</a>
{
<a href="ogre.htm#monster_ogre">monster_ogre</a> ();
};
</pre></body></html>
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -