Help - Search - Members - Calendar
Full Version: [tut] .qc Scripting Concerning Muzzle Flashes
Unknown Worlds Forums > Natural Selection > Natural Selection Creation > NS Customization > Customization Help and Troubleshooting
Obst
(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
Drfuzzy
Ahh, nice, Been wanting to know how you could make more than one attachment biggrin-fix.gif
Necrosis
This would be handy for anyone doing a Predator pack to replace marines.

Me wonders if it could be used to add a small muzzleflash to the acidrocket I currently use with my Predator/Fade hack.
Obst
To add an effect to a projectile which consists of a model (BB/AR) you can use this.
But you might as well use event 7000.
Drfuzzy
QUOTE (Obst @ Mar 20 2005, 01:59 PM)
To add an effect to a projectile which consists of a model (BB/AR) you can use this.
But you might as well use event 7000.

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 biggrin-fix.gif
Obst
Updated the first post smile-fix.gif

Cheers Fuzzy biggrin-fix.gif
Necrosis
No, this would be added to the Pred, a muzzleflash from his plasmacannon, not a flash effect on the bolt.


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.
Drfuzzy
Someone should sticky this, I already use it a few times a day for those events tounge.gif
l0tus
why doesnt this work...

// 1 sequences
$sequence idle "idle" fps 20 { event 7000 1 "AcidHit" }

...for a bilebomb? confused-fix.gif

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...?
Obst
Try to define an $attachment 0 in the .qc on the BB's bone.

Drfuzzy
And set the frame to 0 instead of 1, I think that NS plays the model animation over really fast if its a model thats not ment to move (acid rocket, nade model, yada yada)
Obst
I already told him that tounge.gif
Drfuzzy
No, you said $attachment 0 instead of { event 7000 0 "blah" }
Obst
QUOTE

Session Start: Fri Mar 25 01:26:03 2005
Session Ident: l0tus

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 <>  sad-fix.gif
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
This is a "lo-fi" version of our main content. To view the full version with more information, formatting and images, please click here.
Invision Power Board © 2001-2008 Invision Power Services, Inc.