Adding Custom Sprites To A Model

CaptainPanakaCaptainPanaka Join Date: 2002-11-02 Member: 4718Members
<div class="IPBDescription">How?</div> hi there!

I'm currently working on something special... I got inspired by this pic:

<img src='http://www.unknownworlds.com/forums/uploads//post-19-1087312839.jpg' border='0' alt='user posted image' />
and the smart gun muzzleflash that Delarosa posted some time ago.

I compiled it so it works for HL. But how do I get an effekt like in the pic above?

Using <a href='http://www.unknownworlds.com/forums/index.php?showtopic=73811' target='_blank'>this thread</a> as help, I tried some thing like that. <!--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-->btw

5001 = muzzleflash1.spr
5011 = muzzleflash2.spr
5021 = muzzleflash1.spr
5002 = sparks effect

{ event 5001 0 "30" }

mf1.spr on frame 0 scaled 30 times, 30 is only the size and nothing else <!--emo&:D--><img src='http://www.unknownworlds.com/forums/html//emoticons/biggrin.gif' border='0' style='vertical-align:middle' alt='biggrin.gif' /><!--endemo--><!--QuoteEnd--></td></tr></table><div class='postcolor'><!--QuoteEEnd-->

I got 2 attachments on the muzzle. 1 should play the normal muzzleflash (like the front in the Jin Roh pic) and the other (near the barrel) should play the other MF.

I named the one near the barrel muzzleflash1.spr and the other one muzzleflash3.spr. I edited the qc so it *should* work... but it isn't... I just got the muzzleflash1.spr when fireing... and it is where the other one should be <!--emo&:(--><img src='http://www.unknownworlds.com/forums/html//emoticons/sad.gif' border='0' style='vertical-align:middle' alt='sad.gif' /><!--endemo-->

So how do I get a CUSTOM sprite (because there are just 3 MFs in normal NS and I need to use 4) attached to a model...? <!--emo&:(--><img src='http://www.unknownworlds.com/forums/html//emoticons/sad.gif' border='0' style='vertical-align:middle' alt='sad.gif' /><!--endemo-->
mf.jpg 84.3K

Comments

  • ObstObst Join Date: 2003-03-12 Member: 14436Members, Constellation
    I'd also like to know that. In fact, I pmed someone about that question just some minutes ago and wait for an answer now... <!--emo&:)--><img src='http://www.unknownworlds.com/forums/html//emoticons/smile.gif' border='0' style='vertical-align:middle' alt='smile.gif' /><!--endemo-->
  • CaptainPanakaCaptainPanaka Join Date: 2002-11-02 Member: 4718Members
    edited June 2004
    hehe... wanted to ask you that in IRC, but you were gone... till now <!--emo&???--><img src='http://www.unknownworlds.com/forums/html//emoticons/confused.gif' border='0' style='vertical-align:middle' alt='confused.gif' /><!--endemo-->

    /edit: ah... I now know it has to do something with those mapping events... anyone knows a COMPLETE list of all those events?
  • CaptainPanakaCaptainPanaka Join Date: 2002-11-02 Member: 4718Members
    edited June 2004
    yessar! think I got it <!--emo&:D--><img src='http://www.unknownworlds.com/forums/html//emoticons/biggrin.gif' border='0' style='vertical-align:middle' alt='biggrin.gif' /><!--endemo-->

    has to do something with the NS particle system. open up your "ns.ps" with notepad.

    there you'll find all the events like:

    <!--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-->Start pSystemName HeavyMGSmoke
    ' Max number of particles
    pNumParticles = 1

    ' size
    pSize = 20

    ' number of times to loop through an animated texture
    pAnimationSpeed = 1

    ' num frames in sprite
    pSpriteNumFrames = 10

    ' Particle base color
    pBaseColor = .5 .5 .5

    ' Scale by the lifetime, so it will eventually be pScale*pSize right before it dies
    ? ? pScale = 1

    ' Particle sprite
    pSprite = sprites/lightsmoke.spr

    ' particle max alpha
    particleMaxAlpha = .4

    '1 : "start on"
    '2 : "particle density"
    '4 : "fade in"
    '8 : "fade out"
    '16 : "use world gravity"
    '32 : "tri, not quads"
    '64 : "minimize edges"
    ' flags (fade in, fade out)
    pSpawnFlags = 12

    ' system lifetime
    pSystemLifetime = .1

    ' starting velocity
    pVelShape = Box

    ' starting velocity parms
    pVelParams = -2,-2,0,2,2,3,0,0

    ' render mode
    ' 0 = kRenderNormal
    ' 1 = kRenderTransColor,? // c*a+dest*(1-a)
    ' 2 = kRenderTransTexture, // src*a+dest*(1-a)
    ' 3 = kRenderGlow,?  // src*a+dest -- No Z buffer checks
    ' 4 = kRenderTransAlpha,? // src*srca+dest*(1-srca)
    ' 5 = kRenderTransAdd,? // src*a+dest
    pRenderMode = 5

    ' particle lifetime
    pLifetime = .5

    ' Gen rate
    pGenRate = 40

    ' Gen shape (one of: Point, Line, Triangle, Plane, Box, Cylinder, Cone, Blob, Disc, Rectangle, None)
    pGenShape = Point

    ' Gen params
    pGenShapeParams = 0,0,0,0,0,0,0,0
    end<!--QuoteEnd--></td></tr></table><div class='postcolor'><!--QuoteEEnd-->

    that's how Brig got the smoke trails to his nade <!--emo&:D--><img src='http://www.unknownworlds.com/forums/html//emoticons/biggrin.gif' border='0' style='vertical-align:middle' alt='biggrin.gif' /><!--endemo--> (sorry for decompiling, but I was dying to know how you did it and didn't want to waste your time <!--emo&???--><img src='http://www.unknownworlds.com/forums/html//emoticons/confused.gif' border='0' style='vertical-align:middle' alt='confused.gif' /><!--endemo--> )

    <img src='http://www.unknownworlds.com/forums/uploads//post-19-1088369077.jpg' border='0' alt='user posted image' />

    <!--QuoteBegin-"QC"+--></div><table border='0' align='center' width='95%' cellpadding='3' cellspacing='1'><tr><td><b>QUOTE</b> ("QC")</td></tr><tr><td id='QUOTE'><!--QuoteEBegin-->

    // 1 animation sequence(s)
    $sequence "idle" "idle" fps 1 loop <b>{ event 7000 0 "HeavyMGSmoke" }</b> <!--QuoteEnd--></td></tr></table><div class='postcolor'><!--QuoteEEnd-->

    so you just need to open up the ns.ps, create your own event (with new sprite) and than add it to the qc. voila - done. ^^


    Not tested myself yet, but that's the way it *should* work in theorie...
  • Billy_SilverfishBilly_Silverfish Join Date: 2003-04-20 Member: 15688Members
    ns.ps is read server-side, so anything you add to it will only be seen when you're hosting.*

    *this is assuming that ns.ps didn't become client-side in 3.0
  • CaptainPanakaCaptainPanaka Join Date: 2002-11-02 Member: 4718Members
    <!--QuoteBegin-Billy Silverfish+Jun 28 2004, 11:01 PM--></div><table border='0' align='center' width='95%' cellpadding='3' cellspacing='1'><tr><td><b>QUOTE</b> (Billy Silverfish @ Jun 28 2004, 11:01 PM)</td></tr><tr><td id='QUOTE'><!--QuoteEBegin--> ns.ps is read server-side, so anything you add to it will only be seen when you're hosting.*

    *this is assuming that ns.ps didn't become client-side in 3.0 <!--QuoteEnd--> </td></tr></table><div class='postcolor'> <!--QuoteEEnd-->
    hm iirc the problem is that only YOU see the stuff... but I may be wrong... <!--emo&???--><img src='http://www.unknownworlds.com/forums/html//emoticons/confused.gif' border='0' style='vertical-align:middle' alt='confused.gif' /><!--endemo-->
  • Jean_Luc_PicardJean_Luc_Picard Join Date: 2003-02-03 Member: 13051Members
    I hope I'm not necromanciny (I honestly don't know what MONTH it is right now) but... where did you get that grenade from? That is soo cool! I tried a search... and got page could not be displayed <!--emo&:(--><img src='http://www.unknownworlds.com/forums/html//emoticons/sad.gif' border='0' style='vertical-align:middle' alt='sad.gif' /><!--endemo-->
  • CaptainPanakaCaptainPanaka Join Date: 2002-11-02 Member: 4718Members
    was in the pack with his re-release of his GL <!--emo&:0--><img src='http://www.unknownworlds.com/forums/html//emoticons/wow.gif' border='0' style='vertical-align:middle' alt='wow.gif' /><!--endemo-->
  • VerthandiVerthandi Join Date: 2002-12-12 Member: 10687Members, NS1 Playtester
    Since the thread has been revived, I just thought I'd put in a few words here.

    <!--QuoteBegin-CaptainPanaka+Jun 29 2004, 06:16 AM--></div><table border='0' align='center' width='95%' cellpadding='3' cellspacing='1'><tr><td><b>QUOTE</b> (CaptainPanaka @ Jun 29 2004, 06:16 AM)</td></tr><tr><td id='QUOTE'><!--QuoteEBegin--><!--QuoteBegin-Billy Silverfish+Jun 28 2004, 11:01 PM--></div><table border='0' align='center' width='95%' cellpadding='3' cellspacing='1'><tr><td><b>QUOTE</b> (Billy Silverfish @ Jun 28 2004, 11:01 PM)</td></tr><tr><td id='QUOTE'><!--QuoteEBegin--> ns.ps is read server-side, so anything you add to it will only be seen when you're hosting.*

    *this is assuming that ns.ps didn't become client-side in 3.0 <!--QuoteEnd--></td></tr></table><div class='postcolor'><!--QuoteEEnd-->
    hm iirc the problem is that only YOU see the stuff... but I may be wrong... <!--emo&???--><img src='http://www.unknownworlds.com/forums/html//emoticons/confused.gif' border='0' style='vertical-align:middle' alt='confused.gif' /><!--endemo--><!--QuoteEnd--></td></tr></table><div class='postcolor'><!--QuoteEEnd-->
    The file is indeed still read server-side, so you'll have to make do with what is in the original ns.ps file
  • CaptainPanakaCaptainPanaka Join Date: 2002-11-02 Member: 4718Members
    yep... that's what I tried to say <!--emo&:(--><img src='http://www.unknownworlds.com/forums/html//emoticons/sad.gif' border='0' style='vertical-align:middle' alt='sad.gif' /><!--endemo-->
Sign In or Register to comment.