[tut] .qc Scripting Concerning Muzzle Flashes
Obst
Join Date: 2003-03-12 Member: 14436Members, Constellation
<div class="IPBDescription">Just for the case....</div> (A) The muzzleflash event
**********************
Let's have a look at the event which describes the muzzleflash in a $sequence:
(0) Example.
{ event 5021 1 "62" }
(1) The 4-digit number tells which $attachment is used.
5001 = $attachment 0
5011 = $attachment 1
5021 = $attachment 2
(2) The first digit of the second option (62) tells the scaling of the sprite.
1X = Factor 1 (and so on...)
(3) The second digit of the second option (62) tells what muzzleflash is played.
X2 = mf3
X1 = mf2
X0 = mf1
(4) To sum it up.
{ event 50A1 B "CD" }
A= $attachment A
B= Event plays on frame B
C= Scaling of the sprite
D= Sprite used muzzleflashD+1.spr
________________________________________________________
Always note that you can the $attachment from p_models, change them or incorporate them into the player model's .qc in order to create the largest variety.
A p_model's $attachment position OVERRIDES the position described in the player model's .qc , which allows ultra-precise positioning on the p_model rather than "guessing" on the player model, and it also adds to the possible variety.
(B) The "event 7000" (by DrFuzzy)
*****************************
Usage:
{ event 70X0 Y "effectname" }
X tells which $attachment is used (from 0 to 3 -> 7000; 7010; 7020; 7030)
Y tells the frame on which it appears,
The list of effects (with the name of the sprite they use):
ShotgunSmoke - lightsmoke.spr
WelderLightSmoke - weldsmoke.spr
WelderHeavySmoke - steam1.spr
WelderBluePlasma - xspark1.spr
WelderBluePlasmaDrops - welddrip.spr
HeavyMGSmoke - lightsmoke.spr
TeleportEffect - nsteleport.spr
CommandHack - blueball.spr
PhaseInEffect2 - xspark4.spr
SpitHit - bigspit.spr
SpitShoot - bigspit.spr
SpikeHit - spithit.spr
SporeShoot - spore.spr
SporeCloud - spore.spr
MeleeDamage - meleehit.spr
PhaseGateIdle - flare6.spr
ResourceEmission - flare3.spr
UmbraCloud - umbra.spr
AcidHit - acidsplash.spr
BacteriaSpray - bacteria.spr
Xenocide - eexplo.spr
BileBomb - bilebomb.spr
PhaseInEffect - hack.spr
ScanEffect - scan.spr
JetpackEffect - blink2.spr
SmokePuffs - turretsmoke.spr
ChamberDeath - chamberdeath.spr
HiveDeath - chamberdeath.spr
StompEffect - stomp.spr
PheromoneEffect - pheromone.spr
StompSmoke - lightsmoke.spr
**********************
Let's have a look at the event which describes the muzzleflash in a $sequence:
(0) Example.
{ event 5021 1 "62" }
(1) The 4-digit number tells which $attachment is used.
5001 = $attachment 0
5011 = $attachment 1
5021 = $attachment 2
(2) The first digit of the second option (62) tells the scaling of the sprite.
1X = Factor 1 (and so on...)
(3) The second digit of the second option (62) tells what muzzleflash is played.
X2 = mf3
X1 = mf2
X0 = mf1
(4) To sum it up.
{ event 50A1 B "CD" }
A= $attachment A
B= Event plays on frame B
C= Scaling of the sprite
D= Sprite used muzzleflashD+1.spr
________________________________________________________
Always note that you can the $attachment from p_models, change them or incorporate them into the player model's .qc in order to create the largest variety.
A p_model's $attachment position OVERRIDES the position described in the player model's .qc , which allows ultra-precise positioning on the p_model rather than "guessing" on the player model, and it also adds to the possible variety.
(B) The "event 7000" (by DrFuzzy)
*****************************
Usage:
{ event 70X0 Y "effectname" }
X tells which $attachment is used (from 0 to 3 -> 7000; 7010; 7020; 7030)
Y tells the frame on which it appears,
The list of effects (with the name of the sprite they use):
ShotgunSmoke - lightsmoke.spr
WelderLightSmoke - weldsmoke.spr
WelderHeavySmoke - steam1.spr
WelderBluePlasma - xspark1.spr
WelderBluePlasmaDrops - welddrip.spr
HeavyMGSmoke - lightsmoke.spr
TeleportEffect - nsteleport.spr
CommandHack - blueball.spr
PhaseInEffect2 - xspark4.spr
SpitHit - bigspit.spr
SpitShoot - bigspit.spr
SpikeHit - spithit.spr
SporeShoot - spore.spr
SporeCloud - spore.spr
MeleeDamage - meleehit.spr
PhaseGateIdle - flare6.spr
ResourceEmission - flare3.spr
UmbraCloud - umbra.spr
AcidHit - acidsplash.spr
BacteriaSpray - bacteria.spr
Xenocide - eexplo.spr
BileBomb - bilebomb.spr
PhaseInEffect - hack.spr
ScanEffect - scan.spr
JetpackEffect - blink2.spr
SmokePuffs - turretsmoke.spr
ChamberDeath - chamberdeath.spr
HiveDeath - chamberdeath.spr
StompEffect - stomp.spr
PheromoneEffect - pheromone.spr
StompSmoke - lightsmoke.spr
Comments
Me wonders if it could be used to add a small muzzleflash to the acidrocket I currently use with my Predator/Fade hack.
But you might as well use event 7000.
But you might as well use event 7000. <!--QuoteEnd--></td></tr></table><div class='postcolor'><!--QuoteEEnd-->
Context being:
{ event 7000 1 "effectname" }
1 being the frame, and to change the attachment, you do event 7010, 7020, 7030, for the $attachment number.
The list of effects (with the sprite they use):
ShotgunSmoke - lightsmoke.spr
WelderLightSmoke - weldsmoke.spr (bigger than heavy smoke, but the sprite is better made.)
WelderHeavySmoke - steam1.spr (Solid white smoke, but it looks better the way it floats up)
WelderBluePlasma - xspark1.spr
WelderBluePlasmaDrops - welddrip.spr
HeavyMGSmoke - lightsmoke.spr
TeleportEffect - nsteleport.spr
CommandHack - blueball.spr
PhaseInEffect2 - xspark4.spr
SpitHit - bigspit.spr
SpitShoot - bigspit.spr
SpikeHit - spithit.spr
SporeShoot - spore.spr
SporeCloud - spore.spr
MeleeDamage - meleehit.spr
PhaseGateIdle - flare6.spr
ResourceEmission - flare3.spr
UmbraCloud - umbra.spr
AcidHit - acidsplash.spr
BacteriaSpray - bacteria.spr
Xenocide - eexplo.spr
BileBomb - bilebomb.spr
PhaseInEffect - hack.spr
ScanEffect - scan.spr
JetpackEffect - blink2.spr
SmokePuffs - turretsmoke.spr
ChamberDeath - chamberdeath.spr
HiveDeath - chamberdeath.spr
StompEffect - stomp.spr
PheromoneEffect - pheromone.spr
StompSmoke - lightsmoke.spr
Phew, thats alot of copy and paste <!--emo&:D--><img src='http://www.unknownworlds.com/forums/html/emoticons/biggrin-fix.gif' border='0' style='vertical-align:middle' alt='biggrin-fix.gif' /><!--endemo-->
Cheers Fuzzy <!--emo&:D--><img src='http://www.unknownworlds.com/forums/html/emoticons/biggrin-fix.gif' border='0' style='vertical-align:middle' alt='biggrin-fix.gif' /><!--endemo-->
Before I'd implement such a thing tho I'd have to fix that borked Heavy Pred floating around the forums, find models to replace all the other weapons, and book 6 months off work it put it all together plus 3rd person reloads, etc.
Too much of a perfectionist.
// 1 sequences
$sequence idle "idle" fps 20 { event 7000 1 "AcidHit" }
...for a bilebomb? <!--emo&???--><img src='http://www.unknownworlds.com/forums/html/emoticons/confused-fix.gif' border='0' style='vertical-align:middle' alt='confused-fix.gif' /><!--endemo-->
i made one as per some of obst's input that had that event attached to every frame, and it worked. however, the splash isnt attached to the bilebomb; its generated in the center of the map. i noticed on nomblizkikk04, a smaller map that you can actually see the center of. why isnt it attached to the model...?
<b>Session Start: Fri Mar 25 01:26:03 2005
Session Ident: l0tus</b>
l0tus <> could you tell me why this...
l0tus <> // 1 sequences
l0tus <> $sequence idle "idle" fps 20 { event 7000 1 "AcidHit" }
l0tus <> wouldnt work fer a bilebomb?
Obst|narf <> { event 7000 0 "AcidHit" }
Obst|narf <> try that
l0tus <> i did.
l0tus <> <!--emo&:(--><img src='http://www.unknownworlds.com/forums/html/emoticons/sad-fix.gif' border='0' style='vertical-align:middle' alt='sad-fix.gif' /><!--endemo-->
l0tus <> shouldnt it attach the sprite to the model, and "play" it?
l0tus <> or would it just show it when the model is created i.e. coming out of gorge's mouth?
Obst|narf <> This depends on the code
Obst|narf <> hm
Obst|narf <> 30 frame animation
Obst|narf <> 20 fps
Obst|narf <> That means that the BB would have to be in the air for some time to notice it the second time
l0tus <> oh yeah? so anything you attach to it weould be that way, eh?
l0tus <> or is it dependent on event's variables in ns.ps
Obst|narf <> You could add it to more frames than 1
Obst|narf <> $sequence idle "idle" fps 20 { event 7000 0 "AcidHit" } { event 7000 9 "AcidHit" } { event 7000 19 "AcidHit" }
Obst|narf <> "spam" it
Obst|narf <> and test it
Obst|narf <> also try another sprite
Obst|narf <> { event 7000 0 "StompSmoke" }
Obst|narf <> StompSmoke
Obst|narf <> Try that
Obst|narf <> It is very noticable<!--QuoteEnd--></td></tr></table><div class='postcolor'><!--QuoteEEnd-->