[tut] .qc Scripting Concerning Muzzle Flashes

ObstObst 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

Comments

  • DrfuzzyDrfuzzy FEW... MORE.... INCHES... Join Date: 2003-09-21 Member: 21094Members
    Ahh, nice, Been wanting to know how you could make more than one attachment <!--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-->
  • NecrosisNecrosis The Loquacious Sage Join Date: 2003-08-03 Member: 18828Members, Constellation
    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.
  • ObstObst Join Date: 2003-03-12 Member: 14436Members, Constellation
    edited March 2005
    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.
  • DrfuzzyDrfuzzy FEW... MORE.... INCHES... Join Date: 2003-09-21 Member: 21094Members
    edited March 2005
    <!--QuoteBegin-Obst+Mar 20 2005, 01:59 PM--></div><table border='0' align='center' width='95%' cellpadding='3' cellspacing='1'><tr><td><b>QUOTE</b> (Obst @ Mar 20 2005, 01:59 PM)</td></tr><tr><td id='QUOTE'><!--QuoteEBegin--> 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. <!--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-->
  • ObstObst Join Date: 2003-03-12 Member: 14436Members, Constellation
    Updated the first post <!--emo&:)--><img src='http://www.unknownworlds.com/forums/html/emoticons/smile-fix.gif' border='0' style='vertical-align:middle' alt='smile-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-->
  • NecrosisNecrosis The Loquacious Sage Join Date: 2003-08-03 Member: 18828Members, Constellation
    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.
  • DrfuzzyDrfuzzy FEW... MORE.... INCHES... Join Date: 2003-09-21 Member: 21094Members
    Someone should sticky this, I already use it a few times a day for those events <!--emo&:p--><img src='http://www.unknownworlds.com/forums/html/emoticons/tounge.gif' border='0' style='vertical-align:middle' alt='tounge.gif' /><!--endemo-->
  • l0tusl0tus Join Date: 2004-09-07 Member: 31492Members
    edited March 2005
    why doesnt this work...

    // 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...?
  • ObstObst Join Date: 2003-03-12 Member: 14436Members, Constellation
    Try to define an $attachment 0 in the .qc on the BB's bone.
  • DrfuzzyDrfuzzy FEW... MORE.... INCHES... Join Date: 2003-09-21 Member: 21094Members
    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)
  • ObstObst Join Date: 2003-03-12 Member: 14436Members, Constellation
    I already told him that <!--emo&:p--><img src='http://www.unknownworlds.com/forums/html/emoticons/tounge.gif' border='0' style='vertical-align:middle' alt='tounge.gif' /><!--endemo-->
  • DrfuzzyDrfuzzy FEW... MORE.... INCHES... Join Date: 2003-09-21 Member: 21094Members
    edited March 2005
    No, you said $attachment 0 instead of { event 7000 <b>0</b> "blah" }
  • ObstObst Join Date: 2003-03-12 Member: 14436Members, Constellation
    edited March 2005
    <!--QuoteBegin--></div><table border='0' align='center' width='95%' cellpadding='3' cellspacing='1'><tr><td><b>QUOTE</b> </td></tr><tr><td id='QUOTE'><!--QuoteEBegin-->
    <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-->
Sign In or Register to comment.