new years
Posted: Thu Dec 28, 2006 10:36 am
any ideas on modding a pistol (or something) to shoot party favors (server side) for new years???
Code: Select all
// Primary fire type info
firetype bullet
ammotype "pistol"
meansofdeath bulletCode: Select all
// Primary fire type info
firetype projectile
ammotype "heavy"
projectile models/ammo/us_bomb.tikCode: Select all
// DM Attributes
dmbulletcount 1Code: Select all
// DM Attributes
dmprojectile models/projectiles/bazookashell_dm.tikCode: Select all
init
{
server
{
classname Projectile
anim idle
setsize "-4 -4 -4" "4 4 4"
speed 1000 // adjust this speed here
addownervelocity 0
hitdamage 200 // whether you want it to cause damage or not?
life 10.0 // or however long you want this to fly before exploding
// health 50
// takedamage // uncomment these lines if you want it to take damage
meansofdeath rocket
explosionmodel models/fx/bazookaexplosion_dm.tik
explodeontouch
smashthroughglass 64
knockback 300
dlight 0.4 0.2 0.1 256 // red green blue radius
commanddelay 0.17 drunk 0.12 0.12
cache blastmark.spr
cache models/fx/bazookaexplosion.tik
}
}
Code: Select all
idle us_bomb.skcCode: Select all
idle us_bomb.skc {
entry exec global/fireworks.scr "trail"
}Code: Select all
first explosioneffect bazookaCode: Select all
first exec global/fireworks.scr "explosion"Code: Select all
main local.arg:
if (local.arg == "trail")
goto trail
if (local.arg == "explosion")
goto explosion
end
trail:
// self is the bomb projectile here
self.scale = 0.5 // make the bomb smaller
// insert your trail effects here - light, spawn smoke emitters, etc.
self light 1 0 0 300
local.smoke = spawn models/emitters/linger_smoke.tik
local.smoke glue self
while (isAlive(self))
waitframe
local.smoke delete
end
explosion:
// self is the explosion here; keep in mind it gets removed in 0.1 second = 2 server frames, so store the origin if we want longer-lasting effects
local.org = self.origin
for (local.i = 0; local.i < 10; local.i++) {
local.ent = spawn script_model model/fx/corona_red.tik origin local.org targetname "firework_light"
local.ent light 1 0 0 400
local.vec = ( -30 (randomint(360)) 0 ) // 30 degrees up
local.vec = (angles_toforward local.angles) * 500 // 500 is the velocity here
local.ent physics_on
local.ent.velocity = local.vec
local.ent playsound arty_leadinmp // you'll need to cache this sound!
}
wait 10 // how long do you want the lights to live
$firework_light delete
end
lol man i wish mru was throwing a new years mod contest also, that would win, hands down.Viper wrote:any ideas on modding a pistol (or something) to shoot party favors (server side) for new years???