yeah, so... i can't get this fucking thing to work.
i've been trying to stick railgun-wise trails to the sniper rifles, but it's just not working. i've got the trails and other effects blah blah to spawn and bounce around, only problem is they don't want to go where you point them; they seem to gravitate to specific points on the map.
now i might be doing something superbly wrong or it's just impossible, wondered if anyone could show me the way on this...
if you want to see what i've done i'll email you the .pk3 or just post the code up here.
now, i've not known the AI snipers to miss, but here you can see how the trail is way off of my target. i managed to get through this whole level without being shot once by a sniper...
this is the tiki of the springfield (it's shrunk to mini-font so it doesn't spam the thread up :P ):
TIKI
setup
{
scale 0.52 // Set default scale to 16/30.5 since world is in 16 units per foot and model is in cm's
path models/weapons/springfield
skelmodel springfield.skd
surface springfield1 shader springfield
surface springfield2 shader springfield
surface lens shader lens
}
$define sounddir sound/weapons
init
{
server
{
classname Weapon
weapontype rifle
name "Springfield '03 Sniper"
rank 230 230
// this is attached to the player during reload
cache models/ammo/springfield_clip_reload.tik
}
client
{
cache tracer.spr
cache muzsprite.spr
cache models/ammo/rifleshell.tik
cache models/fx/muzflash.tik
cache model models/fx/snipesmoke.tik
}
}
animations
{
idle springfield.skc
// reload spring_reload.skc
reload spring_reload_start.skc // this is the start of the reloading sequence
{
client
{
entry sound springfield_snd_reload_start
}
}
reload_single spring_reload_fill.skc // this is the reload loop that loads in a single shell
{
client
{
entry sound springfield_snd_reload_single
}
}
reload_end spring_reload_end.skc
{
server
{
last idle
}
client
{
entry sound springfield_snd_reload_end
}
}
rechamber spring_recham.skc
{
client
{
entry sound springfield_snd_bolt item
20 tagspawn tag_eject 1024
(
spawnrange 2048
count 1
model models/ammo/rifleshell.tik
scale 1.0
velocity 70
randvel crandom 10 crandom 10 random 20
emitterangles 0 0 0
avelocity crandom 90 crandom 90 0
accel 0 0 -800
physicsrate 20
life 2.0
fadedelay 1.7
collision
bouncefactor 0.2
bouncesoundonce snd_rifle_shell
)
}
}
fire springfield.skc
{
server
{
entry shoot
}
client
{
entry stopaliaschannel springfield_snd_fire
entry sound springfield_snd_fire
// By now, the server has already fired the weapon, so it's
// ok to apply the view kick apon entry to avoid problems
// with multiple application on single frame animations.
////////////////////////////////////////////////////////////////////////////////////////
// View Kicking
//
// View Kicking works based on the assumptions that every weapon has its own tendencies to kick in
// a paticular fashion. In MOH we call then scatter patterns. Currently we have 2 scatter patterns which
// will be explained.
// Scatter Patterns:
// "V" - the cone. The longer you shoot the more random your shots will be in the horizontal axis.
// "T" - the T shape. The gun has a tendancy to push in a paticular direction.
//
//
// +-------------------------------------------- Scatter Pitch Min
// | +--------------------------------------- Scatter Pitch Max
// | | +------------------------------- Scatter Yaw Min
// | | | +--------------------------- Scatter Yaw Max
// | | | | +--------------------- The Recentering speed in degrees per second
// | | | | | +---------------- The Scatter Pattern
// | | | | | | +---------- The absolute pitch min/max
// | | | | | | | +------- The absolute yaw min/max
// | | | | | | | | +----- This is the pitch at which you loose all
// | | | | | | | | | control of the weapon and its behavior is
// | | | | | | | | | purely random.
// V V V V V V V V V
entry viewkick -4.5 -5.0 -1.0 1.0 6 "T" 8 8 8
you mean in the second set of tiki i posted? i'm not going to ask you to tell me the problem, seeing as that's pretty lame on my part... but do you know of any libraries for tiki code? then at least i'll know exactly what i'm doing and looking for...