new years
Moderator: Moderators
new years
any ideas on modding a pistol (or something) to shoot party favors (server side) for new years???
-
Rookie One.pl
- Site Admin
- Posts: 2752
- Joined: Fri Jan 31, 2003 7:49 pm
- Location: Nowa Wies Tworoska, Poland
- Contact:
Off the top of my head, but should work:
1. Use some mod to disable bazookas on your server.
2. Open your pistol TIKI, go to the server subsection in the init section and replace:
with:
Then, replace this:
with this:
Also, remove all bulletcount, dmbulletcount, bulletrange, dmbulletrange, firespreadmult, dmfirespreadmult, bulletdamage and dmbulletdamage lines.
3. Open models/ammo/us_bomb.tik and instert this init section before the animations section:
And replace:
with:
4. Open models/fx/bazookaexplosion.tik and under this line:
insert this one:
5. Make a global/fireworks.scr and put this into it:
6. Cache the arty_leadinmp* sounds and adjust the effects to your liking. 
<EDIT>Come to think of it, you could just use the standard bazooka projectile, just adjust it properly and make sure the entry exec global/fireworks.scr command is in the idle animation.
</EDIT>
1. Use some mod to disable bazookas on your server.
2. Open your pistol TIKI, go to the server subsection in the init section and replace:
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.tik3. Open models/ammo/us_bomb.tik and instert this init section before the animations section:
Code: 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
<EDIT>Come to think of it, you could just use the standard bazooka projectile, just adjust it properly and make sure the entry exec global/fireworks.scr command is in the idle animation.
-
PKM
- General
- Posts: 1888
- Joined: Tue Aug 09, 2005 4:43 pm
- Location: Philadelpia but stuck in San Antonio TX (hell)
Re: new years
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???
i'm not f****** angry, i'm from philadelphia .






