PDA

View Full Version : model animations: tutorial



m0d hipp„
13th April 2005, 17:55
Well I havent seen too many new topics in the mohaa thread so I figured, me being the big time mohaa modder id post this up for those who wondered how I did this.

Some of you may remember my chams from this screenshot:
http://dysfunctional-minds.com/ss.jpg

You may be wondering "how the heck did he do that"
Its really easy basically you go into the player tikis located in:
mohaa\main\pak0.pk3\models\player
and open the tik file NOT ****_fps.tik
so for this example I will use the manon tiki "allied_Manon.tik"
You can edit tikis in any word editor such as notepad, I use textpad anyway when you open up the manon tiki u will see this:


TIKI
setup
{
path models/human/manon // Set path to set skelmodel from
skelmodel manon.skd // Set body model

surface coat shader manon_shirt
surface cull_coat shader c_manon_shirt
surface pants shader manon_pants
surface inside shader manon_shirt
surface hand shader manon_hands

path models/human/heads // Set new path for head model
skelmodel manon_head.skd // Set head model
surface manon shader manon_head
}


//
// define what folder to get specific sound from for the player model
//
$define pulloutdir sound/weapons/pullout


init
{
client
{
// Cache sounds here
}
server
{
voicetype manon // set the voicetype to use for multiplayer instant messaging
}
}


//
// include the base player model definition
//
$include models/player/base/include.txt

// need to indicate the end of the tiki file because we have a tiki command at the end
//end


Now the actual coding will take place in the init and animation tags..
few animations I used in my tiki's:

LIGHTNING



init
{
server
{
classname effectentity
notsolid
rendereffects +dontdraw
}
client
{
originemitter lightning1
(
spawnrate 15.00
model electric.spr
color 72.00 800.00 7.00
scale 0.6
life 1.00
angles 0 crandom -250 range 50 -90
fade
)
originemitter lightning2
(
spawnrate 30.00
model electric.spr
color 1.00 1.00 1.00
scale 0.10
life 0.09
scalerate 5.00
radius 23.00
velocity 10.00
fadedelay 0.00
inwardsphere
randomroll
)
}
}

animations
{
idle dummy3.skc
start dummy3.skc
{
client
{
enter emitteron lightning1
enter emitteron lightning2
}
}
stop dummy3.skc
{
client
{
enter emitteroff lightning1
enter emitteroff lightning2
}
}
}


SMOKE

//NOTICE HOW SMOKE DOESNT NEED AN ANIMATION SECTION




init
{
server
{
classname animate
notsolid
rendereffects +dontdraw
}
client
{
originemitter smoke1
(
spawnrate 10.00
model vsssource.spr
alpha 0.50
color 1.00 0.00 0.00
life 2.00
scalerate 0.50
radius 10.00
velocity 30.00
offsetalongaxis crandom -2 crandom -2 crandom -2
angles 0 0 crandom -30
avelocity 0 0 crandom -20
scalemin 0.50
scalemax 2.00
fade
)

originemitter smoke2
(
spawnrate 10.00
model vsssource.spr
color 1.00 0.00 0.00
scale 5.00
life 2.00
scalerate 0.50
velocity 23.00
offsetalongaxis 0 crandom -20 range 7 -4
angles 0 0 56
avelocity 0 0 45
fade
)
}
}


FIRE

//FIRE DOESNT NEED AN ANIMATION EITHER





init
{
server
{
classname animate
notsolid
rendereffects +dontdraw
}
client
{
originemitter fire1
(
spawnrate 10.00
model explosed2.spr
alpha 0.50
color 0.50 0.50 1.00
varycolor
life 2.00
scalerate 0.50
radius 10.00
velocity 30.00
accel 0.00 0.00 190.00
friction 2.00
offsetalongaxis crandom -2 crandom -2 crandom -2
angles 0 0 crandom -30
avelocity 0 0 crandom -20
scalemin 0.50
scalemax 2.00
fade
)

originemitter fire2
(
spawnrate 10.00
model sharpflame.spr
color 0.50 1.00 1.00
varycolor
scale 5.00
life 2.00
scalerate 0.50
velocity 23.00
accel 0.00 0.00 300.00
friction 1.00
offsetalongaxis 0 crandom -20 range 7 -4
angles 0 0 56
avelocity 0 0 45
fade
)
}
}



Now to explain whats what

some of you may have found a pattern when you look at


init
{
server
{
classname effectentity
notsolid
rendereffects +dontdraw
}
}

^^ this tends to never change, or from atleast what I came through, this is because these arent actual models, and therefore are NOT solid, somewhat like sprites if u want to think of it like that.

m0d hipp„
13th April 2005, 17:57
Now the client section holds alot of information about how the animation acts in the game:
Here is a list of the different client game module classes in the game
//credits goto scorpio midget for making this list:




Client Game Module Classes

Class

ClientGameCommandManager -> Listener -> Class



(

* Signals the beginning of a block of commands


)

* Signals the end of a block of commands


accel( Float xAcc, Float yAcc, Float zAcc )

* Set the acceleration of the spawned tempmodel.
This acceleration is applied using the world axis


alias( String alias, String realPath, [ String arg1 ], [ String arg2 ], [ String arg3 ], [ String arg4 ], [ String arg5 ], [ String arg6 ] )

* Create an alias to the specified path


aliascache( String alias, String realPath, [ String arg1 ], [ String arg2 ], [ String arg3 ], [ String arg4 ], [ String arg5 ], [ String arg6 ] )

* Create an alias to the specified path and cache the resource


align

* Align the tempmodels to the direction they are traveling


alignonce

* Align the tempmodels to the direction they are traveling at the time they are initialized


alignstretch( [ Float scaleMultiplier ] )

* Aligns the temp model to the direction of travel, and stretches it betwen the last and current positions.


alpha( Float alpha )

* Set the alpha of the spawned tempmodel


alwaysdraw

* Set emitter/tempmodel to be alwaysdraw. Which can be turned off by alwaysdraw


angles( [ String [random|crandom|range] ], Float pitch, [ Float [pitch2] ], [ String [random|crandom|range] ], Float yaw, [ Float [yaw2] ], [ String [random|crandom|range] ], Float roll, [ Float [roll2] ] )

* If random is specified, the component will range from 0 to +specified value.
If crandom is specified, the component will range from -specified to +specified value.
If range is specified, the component needs two values; it will randomly pick a number in the range
from the first number to the first number plus the second number.
If no keyword is explicitly specified, then the component will be just set
without randomness.


anim( String animation )

* Set a tempmodel the the specified animation


animateonce

* Set a tempmodel to animate once and then get removed


avelocity( Float yawVel, Float pitchVel, Float rollVel )

* Set the angular velocity of the spawned tempmodel


beam_offset_endpoints

* Make the beams endpoints offset to reduce the bunching up effect


beamdelay( [ String [random] ], [ Float delay ] )

* Set the delay time between creating new beams.
If the keyword random is specified, the delay between beams will occur randomly between 0 and the time specified


beamlength( Float length )

* Set the length of the beam or trace length (for decals)


beampersist

* Make the beams persist instead of blinking out


beamshader( String shadername )

* Set the shader to use for the beam


beamsphere( Integer count )

* Create a sphere shaped beam effect from the origin. Count is the number of beams


beamtoggledelay( [ String [random] ], [ Float delay ] )

* Set a delay between toggling the beams on and off.
If the keyword random is specified, the delay between toggling will occur randomly between 0 and the time specified


blockdlight( Float intensity, Float life, [ String type1 ], [ String type2 ] )

* Spawn a dynamic light from the origin of the model
An additional commands block allows the specification of moving & varying dlights
The intensity is the radius of the light
type is the type of light to create (lensflare,viewlensflare,additive)


bodyfall( [ Float fVolume ] )

* Play a body fall sound that is appropriate to the surface we are falling on


bouncedecal( Integer maxamount, [ Integer temporary ] )

* Put a mark when the tempmodel bounces and hits a surface
maxamount = Max amount of decals to make when bouncing
temporary = specify 1 for a temporary mark that only appears for a short time, 0 for a decal that stays aroung longer (default is 0)


bouncefactor( Float factor )

* Set the bounciness of a tempmodel when it hits a solid.
A factor > 1 will make the model bounce higher and higher on each hit


bouncesound( String sound, [ Float [delay] ] )

* When bouncing, what sound to play on impact and an option delay (default is 1 second) between playing this sound


bouncesoundonce( String sound )

* When bouncing, what sound to play on impact one time


cache( String resourceName )

* Cache the specified resource


cachefont( String fontName )

* Cache the specified font (For menu graphics that should never be picmiped)


cachefromalias( String alias )

* Caches all data matching a previously specified alias


cacheimage( String imageName )

* Cache the specified image (For menu graphics that should never be picmiped)


circle

* Set the tempmodels to be spawned in a circle around the origin
This circle will be generated in the X/Y axis of the model


clampvel( Float minX, Float maxX, Float minY, Float maxY, Float minZ, Float maxZ )

* sets the valid range for velocities along global axes. Cannot be used with clampvelaxis.


clampvelaxis( Float minX, Float maxX, Float minY, Float maxY, Float minZ, Float maxZ )

* sets the valid range for velocities along oriented axes. Cannot be used with clampvel.


client( [ String arg1 ], [ String arg2 ], [ String arg3 ], [ String arg4 ], [ String arg5 ], [ String arg6 ] )

* Execute the specified command arg string


collision( [ String water ] )

* Turn on collision for the tempmodel.
If the keyword water is specified, then the tempmodel will collide with water


color( Float red, Float green, Float blue, [ Float alpha ] )

* Set the color (modulate) of the spawned tempmodel.


colorvelocity( Float rVel, Float gVel, Float bVel )

* Set the color velocity of the spawned dlight tempmodel


commanddelay( Float delay, String command, [ String [arg1] ], [ String [arg2] ], [ String [arg3] ], [ String [arg4] ], [ String [arg5] ], [ String [arg6] ] )

* executes a command after the given delay


cone( Float height, Float radius )

* Randomly spawns the particle somewhere inside a cone along the model's local x axis


count( Integer count )

* Set the number of tempmodels that are spawned
This is only used for the originspawn and tagspawn commands,
and not for emitters, use spawnrate instead


decalradius( Float radius )

* Set the radius of the decal


decalshader( String shadername )

* Set the shader to use for the impact decal


delayedrepeat( Float time, Integer commandnumber, [ String [arg1] ], [ String [arg2] ], [ String [arg3] ], [ String [arg4] ], [ String [arg5] ], [ String [arg6] ] )

* Set the time delay between this command getting executed. This requires a command number to be assigned here.
This is internally used to keep track of the commands this entity executes and will resolve naming conflicts.
This is only useful if the command gets called continuously but must execute at regular intervals.


delayedsfx( Float fDelay, String sCommand, [ String arg1 ], [ String arg2 ], [ String arg3 ], [ String arg4 ], [ String arg5 ], [ String arg6 ], [ String arg7 ], [ String arg8 ] )

* Used for adding commands to a special effect with a time delay


detail

* Set emitter/tempmodel to be detail. Which can be turned off by detail


dietouch

* Set the spawned tempmodels to die when they touch a solid


dlight( Float red, Float green, Float blue, Float intensity, [ String type1 ], [ String type2 ] )

* This makes the emitter itself a dynamic lightThe red,green,blue parms are the color of the light
The intensity is the radius of the light
type is the type of light to create (lensflare,viewlensflare,additive)


emitterangles( [ Float pitchofs ], [ Float yawofs ], [ Float rollofs ] )

* Set the tempmodels angles to that of the emitter
The three optional parameters are for setting an angle offset from the emitter


emitteroff( String emitterName )

* Turn the specified emitter off


emitteron( String emitterName )

* Turn the specified emitter on


endalpha( Float alpha )

* Set the alpha of the beam's endpoint


entcolor( Float red, Float green, Float blue, [ Float alpha ] )

* Set the color(modulate) of this entity


eyelimits( Float fPitchmax, Float fYawmax, Float fRollmax )

* Set the max angle offsets for the eyes from the model's head


eyemovement( Float fMovement )

* Sets the amount of the head's movement to apply to the players view. 1 is full, 0 is none


fade

* Set the tempmodel to fade out over it's life


fadedelay( Float time )

* Set the amount of time to delay a fade


fadein( Float time )

* Set the tempmodel to fade in over the specified time


flicker

* Set the tempmodel to change it's alpha every frame. Creates a flickering effect


footstep( String tag, String sRunning, [ Integer iEquipment ] )

* Play a footstep sound that is appropriate to the surface we are currently stepping on
sRunning should be set to run, walk, or ladder


friction( Float friction )

* Set the friction as a fraction of velocity per second... exact effect depends on physics rate:
slowdown per second = [1 - (friction / physicsrate)] ^ physicsrate; physicsrate defaults to 10


globalfade( [ String [in|out] ] )

* Set the tempmodels to globally fade in or out together


hardlink

* Set the tempmodels linked to the model they are spawned from, so they move with it


inwardsphere

* Create the tempmodels in a sphere around the origin, and adjust their
angle so they point toward the center of the sphere. This is best used with a
spehere radius and some velocity so the models look like they're heading toward the
center of the sphere.


landing( [ Float fVolume ], [ Integer iEquipment ] )

* Play a landing sound that is appropriate to the surface we are landing on


life( Float life, [ Float randomlife ] )

* Set the life (in seconds) of the spawned tempmodel


lightstyle( String nameOfImage )

* Set a lightstyle to determine the color of this tempmodel, the image
specified is used to determine the look of the light style


loopsound( String soundName, [ Float volume ], [ Float min_distance ], Float pitch )

* Play the specifed sound as a looping sound


maxoffset( Float maxoffset )

* Set the maximum offset from center in a beam


minoffset( Float minoffset )

* Set the minimum offset from center in a beam


model( String modelname1, [ String modelname2 ], [ String modelname3 ], [ String modelname4 ], [ String modelname5 ], [ String modelname6 ] )

* Set the modelname of the tempmodel. If more than 1 model is specified, it will
be randomly chosen when spawned


notagaxis

* Forces the effect to use the model's orientation for randvelaxis and offsetalongaxis


numsegments( Integer numsegments )

* Set the number of segments in a beam


offset( [ String [random|crandom|range] ], Float offsetX, [ Float [offsetX2] ], [ String [random|crandom|range] ], Float offsetY, [ Float [offsetY2] ], [ String [random|crandom|range] ], Float offsetZ, [ Float [offsetZ2] ] )

* If random is specified, the component will range from 0 to +specified offset.
If crandom is specified, the component will range from -specified to +specified offset.
If range is specified, the component needs two values; it will randomly pick a number in the range
from the first number to the first number plus the second number.
If no keyword is explicitly specified, then the component will just be added on
without randomness.
This offset is applied using the world axis.


offsetalongaxis( [ String [crandom|random|range] ], Float offsetx, [ Float [offsetx2] ], [ String [crandom|random|range] ], Float offsety, [ Float [offsety2] ], [ String [crandom|random|range] ], Float offsetz, [ Float [offsetz2] ] )

* If random is specified, the component will range from 0 to specified offset.
If crandom is specified, the component will range from -specified to +specified offset.
If range is specified, the component needs two values; it will randomly pick a number in the range
from the first number to the first number plus the second number.
If no keyword is explicitly specified, then the component will just be added on
without randomness.
This offset is applied using the model's local axis


orientation( Float degrees )

* Set the degrees to orient the decal. Specify 'random' to use a random orientation


originbeamemitter

* Spawn beams from the origin.
This command is followed by a ( to specify a block of commands that modify the beam


originbeamspawn

* Spawn a beam from the origin.
This command is followed by a ( to specify a block of commands that modify the beam


origindlight( Float red, Float green, Float blue, Float intensity, Float life, [ String type1 ], [ String type2 ] )

* Spawn a dynamic light from the origin of the model
The red,green,blue parms are the color of the light
The intensity is the radius of the light
type is the type of light to create (lensflare,viewlensflare,additive)


originemitter( String emitterName )

* Create an emitter that spawns tempmodels from the origin.
This command is followed by a ( to specify a block of commands that modify the tempmodels


originspawn

* Spawn tempmodels from the origin.
This command is followed by a ( to specify a block of commands that modify the tempmodels


parallel

* Set tempmodel to be parallel to the viewer


parentangles

* Set the tempmodels angles to that of its parent


parentlink

* Set the tempmodels linked to the parent, so they move with the parent model


physicsrate( String rate )

* Set the rate (in updates per second) for the tempmodel's physics to be updated


print( String string )

* Prints a string.


printdeathmsg( String msg1,, String msg2,, String killer,, String victim,, String deathType )

* Prints a death message string. Used to allow death messages to appear in their correct language on client machines.


radialvelocity( Float scale, Float min_additional, Float max_additional )

* Subtracts the particle origin from origin and multiplies by scale, then adds additional velocity
between min and max... negative values bring toward origin


radius( Float radius )

* Set the radius of the sphere for the inwardsphere amd sphere settings


randomchance( Float percentage, [ String [arg1] ], [ String [arg2] ], [ String [arg3] ], [ String [arg4] ], [ String [arg5] ], [ String [arg6] ] )

* Set the percentage chance that command will occur


randomroll

* Set the tempmodels so they pick a random roll value every frame


randvel( [ String [random|crandom|range] ], Float xVel, [ Float [xVel2] ], [ String [random|crandom|range] ], Float yVel, [ Float [yVel2] ], [ String [random|crandom|range] ], Float zVel, [ Float [zVel2] ] )

* Add a random component to the regular velocity.
If random is specified, the component will range from 0 to specified velocity.
If crandom is specified, the component will range from -specified to +specified velocity.
If range is specified, the component needs two values; it will randomly pick a number in the range
from the first number to the first number plus the second number.
If no keyword is explicitly specified, then the component will just be added on
without randomness.
This velocity is applied using the world axis


randvelaxis( [ String [random|crandom|range] ], Float forwardVel, [ Float [forwardVel2] ], [ String [random|crandom|range] ], Float rightVel, [ Float [rightVel2] ], [ String [random|crandom|range] ], Float upVel, [ Float [upVel2] ] )

* Add a random component to the regular velocity.
If random is specified, the component will range from 0 to specified velocity.
If crandom is specified, the component will range from -specified to +specified velocity.
If range is specified, the component needs two values; it will randomly pick a number in the range
from the first number to the first number plus the second number.
If no keyword is explicitly specified, then the component will just be added on
without randomness.
This velocity is applied using the parent axis


relativeangles( )

* makes the spawn angles get applied relative to the orientation of the model


scale( Float scale )

* Set the scale of a spawned tempmodel


scalemax( Float scalemax )

* Set the maximum scale of a spawned tempmodel


scalemin( Float scalemin )

* Set the minimum scale of a spawned tempmodel


scalerate( Float rate )

* Set the scaling rate of the spawned tempmodel
If a negative rate is used, the model will shrink


scaleupdown

* Set the tempmodel to scale up to scale value and then down.


settiki( String settiki )

* sets the tiki the aliases should be on in the sound uberfile

m0d hipp„
13th April 2005, 17:58
//continued from scorpio midgets list above:




sfx( String sCommand, [ String arg1 ], [ String arg2 ], [ String arg3 ], [ String arg4 ], [ String arg5 ], [ String arg6 ], [ String arg7 ], [ String arg8 ] )

* Used for adding commands to a special effect


smokeparms( Float typeinfo, Float fademult, Float scalemult )

* Sets some misc parms for smoke


sound( String soundName, [ String channelName ], [ Float volume ], [ Float min_distance ], [ Float pitch ], [ Float randompitch ], [ String randomvolume ] )

* Play the specified sound


spawnrange( Integer range1, [ Integer range2 ] )

* Sets the range in which this effect will spawn tempmodels. If one number is specified, it is the max range
and 0 is the min range; if two numbers are specified, the larger is the max range.


spawnrate( Float rate )

* Set the spawnrate of the emitter (models per second).
This is only used for emitters and not for the originspawn and tagspawn commands


sphere

* Set the tempmodels to spawn in a sphere around the origin.
If sphereradius is set, the tempmodels will spawn at the radius distance from
the origin


spin( Float rotations_per_second )

* Sets counterclockwise rotations per second at which the emitter's x/y-axes rotate around its z-axis


spread( Float spreadx, Float spready )

* Add a random variance in the spawned beam in the forward direction by the amound specified in spreadx and spready


spritegridlighting

* Calculates grid lighting for a sprite


startoff

* Signals an emitter to start in the off state (no tempmodels are emitted)


stopaliaschannel( String alias )

* Stops the sound channel used by the specified alias.


stoploopsound

* Stop the looping sound


stopsound( String channelName )

* Stops the sound on the specified channel.


swarm( Integer frequency, Float maxspeed, Float delta )

* Create a swarm like effect that the tempmodels follow when they are spawned
frequency is how often they change direction
maxspeed is how fast the tempmodel will move (it's randomly generated every
time the frequency is hit)
delta is how much the tempmodel moves toward the origin every frame


swipe( [ Vector origin ] )

* Do a swipe and add it on to the swipe rendering list.


swipeoff

* Signal the end of a swipe


swipeon( String shader, String startTagName, Float endTagNamelife, Float life )

* Signal the start of a swipe from the current tag


tagbeamemitter( String tagstart, String tagend, String name )

* Create a beam emitter that uses 2 tags to determine it's start and end position


tagbeamspawn( String tagstart, Float name )

* Create a beam emitter that uses the tag to determine it's starting position.


tagdlight( String tagName, Float red, Float green, Float blue, Float intensity, Float life, [ String intvel ], [ String type1 ] )

* Spawn a dynamic light from the specified tag
The red,green,blue parms are the color of the light
The intensity is the radius of the light
type is the type of light to create (lensflare,viewlensflare,additive)


tagemitter( String tagName, String emitterName )

* Create an emitter that spawns tempmodels from the specified tag.
This command is followed by a ( to specify a block of commands that modify the tempmodels


taglist( String arg1, String arg2, [ String arg3 ], [ String arg4 ], [ String arg5 ], [ String arg6 ], [ String arg7 ], [ String arg8 ] )

* Set the tag list to create a beam that travels between all the tags


tagspawn( String tagName )

* Spawn tempmodels from the specified tag.
This command is followed by a ( to specify a block of commands that modify the tempmodels


tagspawnlinked( String tagName )

* Spawn tempmodels from the specified tag, linked to the entity at the tag.
This command is followed by a ( to specify a block of commands that modify the tempmodels


tracelength( Float length )

* Set the length of the trace for the decal


trail( String shader, String startTag, String endTag, Float life )

* Set the tempmodel to have a swipe that follows it


treads( String tagName, String shader, Integer localrefnumber )

* Spawn treads from the specified tag using the specified tread type.


treadsoff( String tagName, Integer localrefnumber )

* Stops spawning treads from the specified tag.


twinkle( Float mintimeoff, Float maxtimeoff, Float mintimeon, Float maxtimeon )

* Set the tempmodel to twinkle with the specified settings


uselasttraceend

* Makes this trace command use the end results of the last trace command


varycolor

* Sets the color to vary by 0 to -200f specified color


velocity( Float forwardVelocity )

* Set the forward velocity of the spawned tempmodel


viewkick( Float pitchmin, Float pitchmax, Float yawmin, Float yawmax, Float recenterspeed, String patters, Float pitchmax, Float yawmax )

* Adds kick to the view of the owner when fired.


volumetric

* Set the effect to spawn volumetric sources rather than tempmodels


wateronly

* makes the temp model remove itself if it leaves water


wind

* Makes the temp model be affected by wind

ClientSpecialEffectsManager -> Listener -> Class



effectdelay( Integer iEffect, Integer iCurrEmitter, Vector vPos, Vector vAngles, Vector vAxisA, Vector vAxisB, Vector vAxisC )

* Resumes the execution of iEffect effect from its iCurrEmitter emitter.

Event -> Class

Listener -> Class



commanddelay( Float delay, String command, [ String [arg1] ], [ String [arg2] ], [ String [arg3] ], [ String [arg4] ], [ String [arg5] ], [ String [arg6] ] )

* executes a command after the given delay


delete

* Removes this listener immediately.


immediateremove

* Removes this listener immediately.


remove

* Removes this listener the next time events are processed.

Script -> Class

VoteOptions -> Class

7 Client Game Module Classes.
141 Client Game Module Events.

Enviro
13th April 2005, 18:28
Thanks for the tut mod hippy, as soon as I get home I am going to try this out!

m0d hipp„
13th April 2005, 18:44
no problem man, if u have any questions feel free to ask, if u have any requests for any animations also feel free to ask ill see if I can help out man.

Enviro
13th April 2005, 19:13
Ok, since you are taking questions...

With that origin emitter stuff is there anyway you could "animate" a solid blue/red/orange line that would be seen everytime you fire. Like isn't there a place for the muzzleflash of a weapon, could you but it in there so that everytime you shoot you would have this custom tracer clientside, instead of the crappy in-game one that is only serverside?

m0d hipp„
13th April 2005, 22:35
I get what ur saying I just cant really "picture it"
Im almost positive its possible, cause ive applied this emitter\animation technique explained above to the sniper, but its alot more complicated with guns, I could explain how to do it, but just to make a long story short, to make this work for a gun such as a sniper you would have to make it shoot "projectiles" as opposed to sprites, now this is super easy with bazookas and nades, due to the fact that they already shoot out projectiles, so basically ud have to create a fx tik\s similar to that of the bazoka tik, you would also need to creat a new "projectile"
Ill look into it, and when I figure it out ill post it on here as well. Ill post it for the sniper only as of right now, but the same technique will be used for the other guns for those of you wondering.

Enviro
14th April 2005, 02:28
Ok sounds good, By the way, do you know where all the .spr files are stored in the pk3s?

m0d hipp„
14th April 2005, 02:32
no sorry, I actually dont. But i think its just built in if im not mistaken. heh.
correct me if im wrong someone.

m0d hipp„
14th April 2005, 17:28
aight ive been working on the bullet emittters, I think I know how to do it now, but i still gotta test it out and see at this point I got the lightning emitting problem is its as a muzzleflash so it doesnt follow the bullet through.

Neural
14th April 2005, 17:39
If you want all the game classes i think it's g_dumpallclasses in console to output a .htm file of everything listed. Use the attachmodel command and attach it to the projectile - That will probably work... But come to think of it, I don't think the bullet is a projectile but it might be possible to add one ;)

c00ki3 m0nst3r
14th April 2005, 18:17
issisx, i believe, made a bullet path thing like this, clientside.. but it used like puff balls.. kinda hard to explain but im quite sure he released it here and shit, so someone might want to dig around for that.. i know its possible, but like you said element, having it follow the bullet path is a different story.. might want to look at the coding for the lightning gun shit in q3 to see how they draw the bolt, and try to apply that type of model to each bullet.. the serverside tracers arent even perfect, as they show ricohet.

now to wander off the point a little..
as for the muzzleflash, s7atic back in the day attached a static muzz flash to the guns instead the regular dynamic/when gun is fired one.. basically he used a stretched out red flag from v2, but as you know, you can really use any texture.. the only problem though, since it was on the barrel tag, is that it doesnt accurately show where someone is aiming and where the shots are going to hit.. when their gun swings, the red line swings.. not to mention if someone is using cameralook its pointless and misleading.

if you can eliminate the viewed weapon swing, perhaps using a cvar suchas g_synchronousclients, then the gun should be pointing straight and therefore accurately show where a straight shot would be fired from an opponent, granted they dont have 3rd person/cameralook. perhaps it would be easier the horizontal flagpole-type model to the models helmet or inlue of the helmet.

idunno, just bouncing some ideas around.

m0d hipp„
14th April 2005, 18:32
yeah thx for the responses guys ill look into it more, I feel really stupid right now cause I remember I had this working a while back perfectly for both client and serverside.
I remember eyecandys flamethrower mod, I took a look at that but the only thing is that its basically a muzflash, but instead of calling out to muzflash.spr it calls out to vssource.spr which gives it the flame, I tryed changing that too lightning.spr and it worked, but it was just like a puff it was at the nozzle of the gun instead of actually tracing\following the bullet. I remember I did this similarly, I got the main concept working just gotta figure this damn thing out. I was thinking of comparing the kar98, bazooka\panzershrek and the flamethrower and to see whats what, cause bazookas shoot out projectiles, so If I can somehow apply that to the kar98 im good to go. Ill look for issix bulletpath mod see if I can find it. Ill try your method too neural.

Enviro
14th April 2005, 21:21
Sounds like things are coming along great, let me know if you need anything mod hippy, if you have msn messenger add me, k?

X-perament
15th April 2005, 07:07
I actually remember those screenies. ^^^

elgan
15th April 2005, 10:59
scorpio's list?

cl_gumpallclasses produces that list:S



dont all that fire lag?


is this thread old? scorp hasnt been seen since 12-28-2004. and about a year before that.

m0d hipp„
15th April 2005, 16:03
thats true, scorp moved onto modding up cod, but hes done a good share for the moh community, the list I provided, he wrote a while back yes, but I just provided that list with a description of whats what for those of you who didnt know any of the functions I used in the animations such as life, color, velocity, gravity.. etc... so scorps list describes what each function controls and such thats y I included it.
Sup reason, been awhile.. u still play mohaa?

btw, x-perm, dunno if u remember this or not, but back in the day I made guns that shoot out lightning and such working perfectly client and serverside, you wouldnt happen to have the file would you? I know I sent them out to a few random ppl and now I cant get ahold of it, and I forgot how I did it last time lol

about the fire\lightning Its not too bad if you screw around with the "life" functions and such and how fast they spawn, if you edit the values to smaller numbers, it wont lag as bad, depending on what your card can handle, I used these values cause it seemed to satisfy my needs appropriatly in the game, btw I didnt mention this, however if your game seems to crash when your running the animations you have to run the gam in full screen. I dont know y it crashes in a minimized screen.

killjoy
16th April 2005, 08:11
maybe little more description and these would be great for new hackers and learning


also element do u remeber me from olllllddddddd xmt with xzibit?

m0d hipp„
16th April 2005, 15:38
heh how can I not remember u.. always asking me for help w\ pk3 editting and how to make stuff haha.

killjoy
16th April 2005, 21:39
lol s0o man u werent great either waht happened to xmt the forums still up but no one posts im into photoshop not im finally learning by myself , also u have soem guys on xmt clan in servers that talk alot of shit and sayin they will close servers wich isnt hard jsut tell them so stfu once and awhile :P

m0d hipp„
17th April 2005, 05:08
dude I dont promote crashing servers, and I personally never crash servers, but if someones talking shit its just cause they choose to run their mouths on their own I have nothing to do with it. But can we please stay on topic now, I wrote this tutorial to help ppl out, cause I got some "ooo ahh's" so I figured ppl would like to know how its done, and I dont want this thread closed incase someone has any questions so lets just stick to topic now.

killjoy
17th April 2005, 05:22
stupid question i forgot how to compile .tik files and such into pk3. :(

m0d hipp„
17th April 2005, 05:37
you use pakscape, to extract pk3's... tik's are just regular ol word documents, u edit it and save it as a .tik file.. then u have to direct it to the coressponding folder to that of the default game.. so lets say ur editing models\players\allied_manon.tik

u open up pakscape create a new folder, name it models, create a new folder in models, name it players, then take the editted allied_manon.tik and drag it over to the players folder.. then in pakscape goto file, save as.. and make sure u select the extension as pk3 on the bottom, and just name it whatever u want.. make sure its w\ a zzz or anything higher than a p letter so that it overwrites the other files... and thats all theres to it.

killjoy
17th April 2005, 06:05
kkk cool ty but how do i compile many pk3.s same process im guessing also what prgram to open opengl. format sry im very rusty man :P

m0d hipp„
17th April 2005, 06:12
you dont open compiled versions of opengl.dll. the little that you can do is use assembly language or hex editting it.. if u have the original src of the opengl "the .cpp files" then you can use visual c++ to edit\compile it.

Enviro
18th April 2005, 18:33
Hey mod hippy, any more luck with the client side tracers?

m0d hipp„
18th April 2005, 19:03
not really :(...

Weedh3ad
10th October 2006, 01:07
Whats originbeamemitter and and originbeamspawn do? Ever mess with that?

m0d hipp„
10th October 2006, 07:19
The tracers have been released. I dont know if you guys remember but elgan and I released a laser weaps v1 and v2 of this and it works perfectly. And yes it did use originbeamemitter, if I remember correctly. jayjay, post your question on here. Try to stay on topic with this though. Ill help you out with it if you still need help, im not suure what you need help with cause I gave you the snippits of code already so all you need to do is copy and paste it.
If you have no knowledge on pk3's first download a program called pakscape.
next download a wallhack like dissolution or n30 or whatever else there is.
using pakscape open the .pk3 file. then extract the files onto your desktop. you should see 3 folders (usually)
models, scripts and textures.

models\players hold player information in there. you will see a BUNCH of tik files. you can open those tiks in any word edittor. I use textpad, but notepad will work too.

take the sources I posted on the 1st page and paste it to all the player tiks accordingly, and that will draw the animation on the player using emitters.

the scripts folder will have some file with the .shader extension, that too can be opened in any word edittor once again I use textpad, but notepad will work.

Im not going to bother all of the functions you see in the shader, but in my sig.. theres a link to the shader lab. if you goto that site, you will find detailed descriptions of what each function does, an example of how to use it etc etc.

the textures folder holds the texture. There will be a texture behind walls, and another texture infront of walls. these textures are defined in the .shader file.
the textures are typically a tga extension, but they can also be jpg. if its a tga extension you HAVE to save it to atleast a 24bit texture or mohaa wont like it.

the tga extension can be opened up in photoshop. You dont need to be a guru in photoshop all you need to do is learn how to select a color from the pallatte and then using the paintbucket icon fill the texture with the color you chose, then save it.

this is a pk3 wallhack tut in a nutshell. There are MANY examples of this in these forums. searching is beautiful. making a wallhack in pk3 is by far the easiest thing to make. Learn it, master it, and experiment with it. Thats what I did. And if it doesnt work.. welcome to my world *cough*trial&error*cough*

jayjay39
10th October 2006, 21:04
lol i have a gr8 wallhack but i want like streaming stripes and or streaming graphics i dont know how to do it nor how to use photoshop

m0d hipp„
10th October 2006, 21:55
as I said photoshop is easy to use, and a great place for tuts is www.good-tutorials.com
it takes no skill at all to make a texture. you fill in the background with a color using the paintbucket, and then using the text tool you write in text. save the image as a 24 or 32 bit tga extension, and then in your shader add this
tcmod scroll x x (x is the speed you want it to scroll in x\y direction.
As I mentioned above I have links in my sig to the shaderlab. Read it, learn it, master it. Its not anything hard. Like I said before, if your willing to learn im willing to help, but im not going to do the work for you. Thats not the way to learn. You have to do something for yourself, saying I dont know photoshop is a poor excuse. get the trial version of the program if u dont already have it and play around with it. its just like paint but with alot more features. Its really not rocket science.

http://www.qeradiant.com/manual/Q3AShader_Manual/ch05/pg5_1.htm#tcmod

Weedh3ad
12th October 2006, 05:44
m0d, I knew originbeam.. sounded familiar...I've done my share of tiki editing before. a while back, My cousin (and I) made a light saber like mod, along with new weapon models. Was pretty funny watching em run around beating eachother with lightsabers.
Ive also managed to complete some very beautiful nade effects. Lemme know if you want to check em out....this mohaa section is getting very boring.

m0d hipp„
12th October 2006, 06:36
yeah feel free to post what you got. Unfortunatly, I dont have mohaa anymore or any of my leeb collections for it :P Just lost all my crap in a hard drive crash. bah stupid p3. Im still trying to get my new rig working.. think I may have a defective cpu and\or mobo

Weedh3ad
14th October 2006, 06:19
It's not much.. but check your PM's
:P