392 lines
No EOL
14 KiB
HTML
392 lines
No EOL
14 KiB
HTML
<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’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 “power” animation is executed.
|
||
<br>
|
||
<br>
|
||
After the definition of the animation <b>“power power.skc”</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>“tagspawn”</b> and it has one parameter on the same line called <b>“hand”</b>. This command allows you to spawn things ( particles, models, sprites ) from the tag that is built into the model ( in this case it’s the hand tag ).
|
||
<br>
|
||
<br>
|
||
The “(“ 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 “(“ and then there is a closing “)”. The “)” 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>“tagspawn”</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 <path> <alias> </b>
|
||
<td>Creates an alias to to the specified path
|
||
</tr>
|
||
<tr>
|
||
<td><b>aliascache <aliasname> <resourcename></b>
|
||
<td>Caches in the specified resource name and creates the alias specified to reference it.
|
||
</tr>
|
||
<tr>
|
||
<td><b>cache <resourcename> </b>
|
||
<td>Caches in the specified resource name
|
||
</tr>
|
||
<tr>
|
||
<td><b>commanddelay <time> <commandnum> <command> [arg1]…[argN] </b>
|
||
<td>Delays the <command> by the <time> specified. There wll be a delay between the execution of the command. The <commandnum> 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 <red> <green> <blue> <intensity> <life> <type> </b>
|
||
<td>Spawn a dlight from the origin of the model. The <type> of the light can be normal, lensflare, or viewlensflare
|
||
</tr>
|
||
<tr>
|
||
<td><b>emitteroff <emittername> </b>
|
||
<td>Turns “off” the specified emitter
|
||
</tr>
|
||
<tr>
|
||
<td><b>emitteron <emittername> </b>
|
||
<td>Turns “on” the specified emitter
|
||
</tr>
|
||
<tr>
|
||
<td><b>entcolor </b>
|
||
<td>Set the color(modulate) of the model.
|
||
</tr>
|
||
<tr>
|
||
<td><b>loopsound <soundfile> [volume] [mindistance] </b>
|
||
<td>Plays the specified sound in a loop
|
||
</tr>
|
||
<tr>
|
||
<td><b>originspawn([parameter list]…) </b>
|
||
<td>Spawn “things” from the origin of the model. The parameter list after the command specify modifiers on the command.
|
||
</tr>
|
||
<tr>
|
||
<td><b>randomchance <amount> <command> [arg1]…[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 <soundfile> [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 <tagname> <size> <life> </b>
|
||
<td>Signal the start of a swipe.
|
||
</tr>
|
||
<tr>
|
||
<td><b>tagdlight <tagname> <red> <green> <blue> <intensity> <life> <type> </b>
|
||
<td>Spawn a dlight from the specified tag of the model. The <type> of the light can be normal, lensflare, or viewlensflare
|
||
</tr>
|
||
<tr>
|
||
<td><b>tagspawn <tagname>([parameter list]…) </b>
|
||
<td>Spawn “things” from the tag specified on the model. The parameter list after the command specify modifiers on the command.
|
||
</tr>
|
||
<tr>
|
||
<td><b>tagbeamspawn <tagname_start> <length> </b>
|
||
<td>Spawns a beam from <tagname_start> of the specified <length>. 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 <tagname> <emittername>(<parameter list>…) </b>
|
||
<td>Creates a tag emitter named <emittername> that spawns out models from <tagname>. 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 <tagname_start> <tagname_end> <emittername>{<parameter list>} </b>
|
||
<td>Creates a beam emitter named <emittername> 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 “things”( tempmodels ) that are spawned from the emitters/spawn points.
|
||
</p>
|
||
|
||
<table border=1 cellpadding=2 cellspacing=3>
|
||
<tr>
|
||
<td><b>accel <accelx> <accely> <accelz> </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 –200)
|
||
</tr>
|
||
<tr>
|
||
<td><b>align </b>
|
||
<td>Aligns the tempmodel in the direction it is traveling
|
||
</tr>
|
||
<tr>
|
||
<td><b>alpha <alpha_value> </b>
|
||
<td>Sets the alpha value of the tempmodel
|
||
</tr>
|
||
<tr>
|
||
<td><b>angles (crandom|random) <yaw> (crandom|random) <pitch> (crandom|random) <roll> </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 <anim_name> </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) <yaw> (crandom|random) <pitch> (crandom|random) <roll> </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 <bounce_value> </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 [‘water’] </b>
|
||
<td>Turns on collision for the tempmodels (saves CPU if you don’t need collision ). Add the water keyword if you want the particles to collide with water.
|
||
</tr>
|
||
<tr>
|
||
<td><b>color <red> <green> <blue> <alpha> </b>
|
||
<td>Sets the color of the tempmodel. This color is modulated with the tempmodel when it is drawn.
|
||
</tr>
|
||
<tr>
|
||
<td><b>colorrange <startRed> <startGreen> <startBlue> <endRed> <endGreen> <endBlue> </b>
|
||
<td>Set the color range to be interpolated over the life of the tempmodel
|
||
</tr>
|
||
<tr>
|
||
<td><b>count <number> </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 <r> <g> <b> <intensity> </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 <time> </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 <”in” | “out> </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 <radius> </b>
|
||
<td>Spawns the tempmodel at radius distance from the origin and moves them inward towards it.
|
||
</tr>
|
||
<tr>
|
||
<td><b>life <seconds> </b>
|
||
<td>The life of the spawned tempmodel.
|
||
</tr>
|
||
<tr>
|
||
<td><b>model <modelname1> [modelname2] [modelname3] … </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) <offsetx> (crandom|random) <offsety> (crandom|random) <offsetz> </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) <offsetx> (crandom|random) <offsety> (crandom|random) <offsetz> </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) <speedx> (crandom|random) <speedy> (crandom|random) <speedz> </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 –speed and speed. If you don’t use the random or crandom keywords, then the added velocity will be constant.
|
||
</tr>
|
||
<tr>
|
||
<td><b>scale <scale_value> </b>
|
||
<td>Sets the scale of the tempmodel to value.
|
||
</tr>
|
||
<tr>
|
||
<td><b>scalemax <scale_value> </b>
|
||
<td>Sets the maximum scale of the tempmodel to value.
|
||
</tr>
|
||
<tr>
|
||
<td><b>scalemin <scale_value> </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 <scale_value> </b>
|
||
<td>Animates the tempmodel by scaling it in size according to the specified scalerate value.
|
||
</tr>
|
||
<tr>
|
||
<td><b>spawnrate <rate_value> </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 “off” state.
|
||
</tr>
|
||
<tr>
|
||
<td><b>swarm <freq> <maxspeed> <delta> </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 <time> </b>
|
||
<td>If you are spawning animated texture sprites, this sets the animation time for that sprite.
|
||
</tr>
|
||
<tr>
|
||
<td><b>trailcolor <red> <green> <blue> <alpha> </b>
|
||
<td>Sets the color of the trail for the tempmodel.
|
||
</tr>
|
||
<tr>
|
||
<td><b>trailradius <radius> </b>
|
||
<td>Sets the width of the trail
|
||
</tr>
|
||
<tr>
|
||
<td><b>trailtime <seconds> </b>
|
||
<td>Sets the life of the trail in seconds
|
||
</tr>
|
||
<tr>
|
||
<td><b>velocity <speed> </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 <amount> </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 <num> </b>
|
||
<td>Set the number of segments in the beam
|
||
</tr>
|
||
<tr>
|
||
<td><b>minoffset <offset> </b>
|
||
<td>Set the minimum offset from center that the beam will move
|
||
</tr>
|
||
<tr>
|
||
<td><b>maxoffset <offset> </b>
|
||
<td>Set the maximum offset from center that the beam will move
|
||
</tr>
|
||
<tr>
|
||
<td><b>beamshader <shader_name> </b>
|
||
<td>Set the shader that the beam will use
|
||
</tr>
|
||
<tr>
|
||
<td><b>beamdelay <delay> </b>
|
||
<td>Set the delay (in seconds) between the drawing of beams
|
||
</tr>
|
||
<tr>
|
||
<td><b>beamtoggledelay [random] <delay> </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 <count> </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>
|
||
|
||
</p>
|
||
|
||
|
||
|
||
<pre>
|
||
<i><font color=blue>
|
||
|
||
</font>
|
||
</i>
|
||
</pre> |