mohaa-spearhead-sdk/docs/MOH_Client_Side_Reference.html

392 lines
14 KiB
HTML
Raw Normal View History

2003-02-06 00:00:00 +00:00
<html>
<head>
<title>MOHAA - SDK</title>
</head>
<body>
<b><u><font size=+2>MOH Client Commands Reference Guide</font></u></b>
<br>
<p>
Last Updated: December 17, 2002
</p>
<b>Overview</b>
<br>
<p>
Client side commands refer to any commands that are used in the client game DLL (cgame DLL). These commands are placed and executed on frames of animation. When a TIKI model<65>s animation is played back on the client, the commands associated with those frames are executed. This document also contains a list of client INIT commands. These are commands that are only executed on the client when the model is initialized. These commands deal with setting up emitters.
</p>
<b>Example</b>
<br>
<p>
This is a list of client commands and parameters for the client. These commands can be placed in a TIKI file for execution. Here is an example to get started:
</p>
<pre>
<i><font color=blue>
Animations
{
power power.skc
{
client
{
first tagspawn tag_hand
(
count 50
model models/flameball.tik
velocity 50
randvel 0 0 200
avelocity random 360 random 360 random 360
life 1
accel 0 0 -100
scale 0.1
fade
bouncefactor 0.8
offset crandom 3 crandom 3 crandom 3
)
}
}
}
</font>
</i>
</pre>
<p>
Here is an explantion of what is going to happen when the first frame of the <20>power<65> animation is executed.
<br>
<br>
After the definition of the animation <b><EFBFBD>power power.skc<6B></b> You can list client and server side commands that will be executed on the specified frames. In this case there is a client command on the first frame of the power animation. Notice that the command is called <b><EFBFBD>tagspawn<EFBFBD></b> and it has one parameter on the same line called <b><EFBFBD>hand<EFBFBD></b>. This command allows you to spawn things ( particles, models, sprites ) from the tag that is built into the model ( in this case it<69>s the hand tag ).
<br>
<br>
The <20>(<28> on the next line starts a block of modifiers and parameters that will affect the spawning properties of the command. There are 11 lines of parameters after the <20>(<28> and then there is a closing <20>)<29>. The <20>)<29> signifies the end of the parameters/modifiers and finishes off the command. Each one of the modifiers is explained below, along with the commands like <b><EFBFBD>tagspawn<EFBFBD></b>.
</p>
<b>Client Animation Commands</b>
<br>
<p>
These commands can be executed on any frame of any animation on the client. These are placed in the client frame commands of the TIKI file
</p>
<table border=1 cellpadding=2 cellspacing=3>
<tr>
<td><b>alias &lt;path&gt; &lt;alias&gt; </b>
<td>Creates an alias to to the specified path
</tr>
<tr>
<td><b>aliascache &lt;aliasname&gt; &lt;resourcename&gt;</b>
<td>Caches in the specified resource name and creates the alias specified to reference it.
</tr>
<tr>
<td><b>cache &lt;resourcename&gt; </b>
<td>Caches in the specified resource name
</tr>
<tr>
<td><b>commanddelay &lt;time&gt; &lt;commandnum&gt; &lt;command&gt; [arg1]<5D>[argN] </b>
<td>Delays the &lt;command&gt; by the &lt;time&gt; specified. There wll be a delay between the execution of the command. The &lt;commandnum&gt; must be provided by the user, It is used to keep track of the different commands and the times they are executed.
</tr>
<tr>
<td><b>dlight &lt;red&gt; &lt;green&gt; &lt;blue&gt; &lt;intensity&gt; &lt;life&gt; &lt;type&gt; </b>
<td>Spawn a dlight from the origin of the model. The &lt;type&gt; of the light can be normal, lensflare, or viewlensflare
</tr>
<tr>
<td><b>emitteroff &lt;emittername&gt; </b>
<td>Turns <20>off<66> the specified emitter
</tr>
<tr>
<td><b>emitteron &lt;emittername&gt; </b>
<td>Turns <20>on<6F> the specified emitter
</tr>
<tr>
<td><b>entcolor </b>
<td>Set the color(modulate) of the model.
</tr>
<tr>
<td><b>loopsound &lt;soundfile&gt; [volume] [mindistance] </b>
<td>Plays the specified sound in a loop
</tr>
<tr>
<td><b>originspawn([parameter list]<5D>) </b>
<td>Spawn <20>things<67> from the origin of the model. The parameter list after the command specify modifiers on the command.
</tr>
<tr>
<td><b>randomchance &lt;amount&gt; &lt;command&gt; [arg1]<5D>[argN] </b>
<td>This will randomly execute the specified command. The amount ranges from 0 to 1 and is the percentage chance that the command will execute.
</tr>
<tr>
<td><b>sound &lt;soundfile&gt; [channel number] [volume] [mindistance] </b>
<td>Plays the specified sound. Channel, volume, and mindistance are optional
<tr>
<tr>
<td><b>swipe </b>
<td>Add a segment to the swipe.
</tr>
<tr>
<td><b>swipeoff</b>
<td>Signal the end of a swipe
</tr>
<tr>
<td><b>swipeon &lt;tagname&gt; &lt;size&gt; &lt;life&gt; </b>
<td>Signal the start of a swipe.
</tr>
<tr>
<td><b>tagdlight &lt;tagname&gt; &lt;red&gt; &lt;green&gt; &lt;blue&gt; &lt;intensity&gt; &lt;life&gt; &lt;type&gt; </b>
<td>Spawn a dlight from the specified tag of the model. The &lt;type> of the light can be normal, lensflare, or viewlensflare
</tr>
<tr>
<td><b>tagspawn &lt;tagname&gt;([parameter list]<5D>) </b>
<td>Spawn <20>things<67> from the tag specified on the model. The parameter list after the command specify modifiers on the command.
</tr>
<tr>
<td><b>tagbeamspawn &lt;tagname_start&gt; &lt;length&gt; </b>
<td>Spawns a beam from &lt;tagname_start&gt; of the specified &lt;length&gt;. The direction is derived from the tag.
</tr>
</table>
<br>
<b>Client Initialization Commands</b>
<br>
<p>
These commands set up client side effects that are not associated with animations These are placed in the client init section of the TIKI file.
</p>
<table border=1 cellpadding=2 cellspacing=3>
<tr>
<td><b>tagemitter &lt;tagname&gt; &lt;emittername&gt;(&lt;parameter list&gt;<EFBFBD>) </b>
<td>Creates a tag emitter named &lt;emittername&gt; that spawns out models from &lt;tagname&gt;. This is not associated with animation frames, so it can be used for static things that emit models without animating.
</tr>
<tr>
<td><b>tagbeamemitter &lt;tagname_start&gt; &lt;tagname_end&gt; &lt;emittername&gt;{&lt;parameter list&gt;} </b>
<td>Creates a beam emitter named &lt;emittername&gt; that spawns beams from tagname_start to tagname_end. This is not associated with animation frames, so it can be used for static things that have beam effects on them
</tr>
</table>
<br>
<b>Parameters for Spawning stuff</b>
<br>
<p>
These are used in the above commands to modify the <20>things<67>( tempmodels ) that are spawned from the emitters/spawn points.
</p>
<table border=1 cellpadding=2 cellspacing=3>
<tr>
<td><b>accel &lt;accelx&gt; &lt;accely&gt; &lt;accelz&gt; </b>
<td>Sets the acceleration for the tempmodel. You can simulate gravity by setting the accelz component to a negative value (E.g. accel 0 0 <20>200)
</tr>
<tr>
<td><b>align </b>
<td>Aligns the tempmodel in the direction it is traveling
</tr>
<tr>
<td><b>alpha &lt;alpha_value&gt; </b>
<td>Sets the alpha value of the tempmodel
</tr>
<tr>
<td><b>angles (crandom|random) &lt;yaw&gt; (crandom|random) &lt;pitch&gt; (crandom|random) &lt;roll&gt; </b>
<td>Sets the angular velocity of the tempmodel. Use the keywords random or crandom as stated in the randvel command.
</tr>
<tr>
<td><b>anim &lt;anim_name&gt; </b>
<td>Set the anim of the spawned tempmodel.
</tr>
<tr>
<td><b>animateonce </b>
<td>Animate the tempmodel once before killing it
</tr>
<tr>
<td><b>avelocity (crandom|random) &lt;yaw&gt; (crandom|random) &lt;pitch&gt; (crandom|random) &lt;roll&gt; </b>
<td>Sets the angular velocity of the tempmodel. Use the keywords random or crandom as stated in the randvel command.
</tr>
<tr>
<td><b>bouncefactor &lt;bounce_value&gt; </b>
<td>Sets the bounciness of the tempmodel. Values greater than 1 will make the model gain speed when it bounces.
</tr>
<tr>
<td><b>circle</b>
<td>Spawns the tempmodels in a circlular pattern on the XY plane
</tr>
<tr>
<td><b>collision [<5B>water<65>] </b>
<td>Turns on collision for the tempmodels (saves CPU if you don<6F>t need collision ). Add the water keyword if you want the particles to collide with water.
</tr>
<tr>
<td><b>color &lt;red&gt; &lt;green&gt; &lt;blue&gt; &lt;alpha&gt; </b>
<td>Sets the color of the tempmodel. This color is modulated with the tempmodel when it is drawn.
</tr>
<tr>
<td><b>colorrange &lt;startRed&gt; &lt;startGreen&gt; &lt;startBlue&gt; &lt;endRed&gt; &lt;endGreen&gt; &lt;endBlue&gt; </b>
<td>Set the color range to be interpolated over the life of the tempmodel
</tr>
<tr>
<td><b>count &lt;number&gt; </b>
<td>The number of tempmodels to be spawned.
</tr>
<tr>
<td><b>dietouch </b>
<td>Kills the tempmodel when it touches a solid surface.
</tr>
<tr>
<td><b>dlight &lt;r&gt; &lt;g&gt; &lt;b&gt; &lt;intensity&gt; </b>
<td>Makes the emitter a dynamic light source of color (r,g,b) and the specified intensity ( radius ).
</tr>
<tr>
<td><b>fade</b>
<td>Fades the tempmodel to complete translucency over the life.
</tr>
<tr>
<td><b>fadein &lt;time&gt; </b>
<td>Fades the tempmodel in over the amount of time specified.
</tr>
<tr>
<td><b>flicker</b>
<td>Causes the tempmodel to flicker randomly
</tr>
<tr>
<td><b>globalfade &lt;<EFBFBD>in<EFBFBD> | <20>out&gt; </b>
<td>Makes the spawned tempmodels fade in or out at the same rate based on the number of frames in the animation of the parent animation.
</tr>
<tr>
<td><b>inwardsphere &lt;radius&gt; </b>
<td>Spawns the tempmodel at radius distance from the origin and moves them inward towards it.
</tr>
<tr>
<td><b>life &lt;seconds&gt; </b>
<td>The life of the spawned tempmodel.
</tr>
<tr>
<td><b>model &lt;modelname1&gt; [modelname2] [modelname3] <20> </b>
<td>The name of the model you want to spawn. If more than one model is specified then the model is chosen randomly from the list
</tr>
<tr>
<td><b>offset (crandom|random) &lt;offsetx&gt; (crandom|random) &lt;offsety&gt; (crandom|random) &lt;offsetz&gt; </b>
<td>Sets an offset of the tempmodel. Use the keywords random or crandom as stated in the randvel command.
</tr>
<tr>
<td><b>offsetalongaxis (crandom|random) &lt;offsetx&gt; (crandom|random) &lt;offsety&gt; (crandom|random) &lt;offsetz&gt; </b>
<td>Sets an offset of the tempmodel. Use the keywords random or crandom as stated in the randvel command. The offset is applied in the coordinate system of the parent
</tr>
<tr>
<td><b>parentlink </b>
<td>Links the spawned tempmodel to the parent. If the parent moves, so does the spawned tempmodel.
</tr>
<tr>
<td><b>randvel (crandom|random) &lt;speedx&gt; (crandom|random) &lt;speedy&gt; (crandom|random) &lt;speedz&gt; </b>
<td>Adds a random velocity to the tempmodel in the x, y, and z axis. Use the keyword random to make the value between 0 and speed. Use the keyword crandom to make the value between <20>speed and speed. If you don<6F>t use the random or crandom keywords, then the added velocity will be constant.
</tr>
<tr>
<td><b>scale &lt;scale_value&gt; </b>
<td>Sets the scale of the tempmodel to value.
</tr>
<tr>
<td><b>scalemax &lt;scale_value&gt; </b>
<td>Sets the maximum scale of the tempmodel to value.
</tr>
<tr>
<td><b>scalemin &lt;scale_value&gt; </b>
<td>Sets the minimum scale of the temp model to value. By setting this, the spawned model will be randomly scaled to a value between scalemin and scalemax.
</tr>
<tr>
<td><b>scalerate &lt;scale_value&gt; </b>
<td>Animates the tempmodel by scaling it in size according to the specified scalerate value.
</tr>
<tr>
<td><b>spawnrate &lt;rate_value&gt; </b>
<td>Sets the rate of spawning for an emitter. This parameter is only valid for emitters that have been defined for the model.
</tr>
<tr>
<td><b>sphere </b>
<td>Spawns the tempmodels traveling in in an outward sphere pattern from the origin.
</tr>
<tr>
<td><b>startoff </b>
<td>Starts an emitter in the <20>off<66> state.
</tr>
<tr>
<td><b>swarm &lt;freq&gt; &lt;maxspeed&gt; &lt;delta&gt; </b>
<td>Causes a swarming effect on the tempmodels. freq is the frequency at which the tempmodel changes direction. maxspeed is the maximum speed of the tempmodel. delta is the amount the tempmodel moves toward the origin to get the swarming effect.
</tr>
<tr>
<td><b>texanimtime &lt;time&gt; </b>
<td>If you are spawning animated texture sprites, this sets the animation time for that sprite.
</tr>
<tr>
<td><b>trailcolor &lt;red&gt; &lt;green&gt; &lt;blue&gt; &lt;alpha&gt; </b>
<td>Sets the color of the trail for the tempmodel.
</tr>
<tr>
<td><b>trailradius &lt;radius&gt; </b>
<td>Sets the width of the trail
</tr>
<tr>
<td><b>trailtime &lt;seconds&gt; </b>
<td>Sets the life of the trail in seconds
</tr>
<tr>
<td><b>velocity &lt;speed&gt; </b>
<td>The speed of the tempmodel. It will travel in the direction based on the orientation of the parent.
</tr>
<tr>
<td><b>wavy &lt;amount&gt; </b>
<td>Causes the tempmodel to move in a wavy effect. amount sets the amount of the wavieness.
</tr>
</table>
<br>
<b>Beam Specific Parameters</b>
<br>
<p>
These parameters are only applicable to beamemitters and tagbeamspawn
</p>
<table border=1 cellpadding=2 cellspacing=3>
<tr>
<td><b>numsegments &lt;num&gt; </b>
<td>Set the number of segments in the beam
</tr>
<tr>
<td><b>minoffset &lt;offset&gt; </b>
<td>Set the minimum offset from center that the beam will move
</tr>
<tr>
<td><b>maxoffset &lt;offset&gt; </b>
<td>Set the maximum offset from center that the beam will move
</tr>
<tr>
<td><b>beamshader &lt;shader_name&gt; </b>
<td>Set the shader that the beam will use
</tr>
<tr>
<td><b>beamdelay &lt;delay&gt; </b>
<td>Set the delay (in seconds) between the drawing of beams
</tr>
<tr>
<td><b>beamtoggledelay [random] &lt;delay&gt; </b>
<td>Set the delay (in seconds) that is used to toggle the beams off and on. If random is used, then the delay will be between 0 and delay.
</tr>
<tr>
<td><b>beampersist </b>
<td>Effect that makes the beams persist and fade out over time
</tr>
<tr>
<td><b>beamsphere &lt;count&gt; </b>
<td>Shoot the beams out in a sphere pattern. If the radius (see above) is set, beams will be drawn at this distance from center
</tr>
</table>
</body>
<p>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
</p>
<pre>
<i><font color=blue>
</font>
</i>
</pre>