Author |
Message |
Rocksonic
Joined: Sat Jan 10, 2009 1:55 am Posts: 75
|
Glowing Laser Beam Trail
I am working on a laser gun/railgun, and I need help with some glow effects. I want a solid green beam to follow the projectile and stay in the air for a few seconds before disappearing. Right now, the effect looks like this: How can I make the trail a solid line instead of a dotted one? Here is a link to the mod: http://www.sendspace.com/file/idrd5xI didn't know wether this belonged in mod making or requests, so I hope this is the right place.
|
Fri Nov 27, 2009 4:49 am |
|
|
411570N3
Joined: Wed Jan 07, 2009 10:26 am Posts: 4074 Location: That quaint little British colony down south
|
Re: Glowing Laser Beam Trail
There is no simple .ini code way to do it without an obscene amount of particles or an obscenely slow projectile. However, I am sure that the maker of the smoke trail thing from the District 9 mod will be more than happy to let you edit his code. You will, however, have to get someone to explain it to you.
|
Fri Nov 27, 2009 5:04 am |
|
|
Duh102
happy carebear mom
Joined: Tue Mar 04, 2008 1:40 am Posts: 7096 Location: b8bbd5
|
Re: Glowing Laser Beam Trail
This what you're looking for? It requires a bit of Lua, but is fairly simple to customize.
|
Fri Nov 27, 2009 5:48 am |
|
|
dragonxp
Joined: Wed Sep 09, 2009 3:16 am Posts: 3032 Location: Somewhere in the universe
|
Re: Glowing Laser Beam Trail
I dont know about you but, p3lb0x made a decent laser trail for his matilda revolver, which i ripped for my own use, (credits to p3lbox) you can find it HEREp3lb0x's matilda revolver gif: Me stealing it xD: [img]CUT%20OUT%20TO%20AVOID%20FLAMING%20xD[/img]
Last edited by dragonxp on Mon Nov 30, 2009 7:54 pm, edited 1 time in total.
|
Mon Nov 30, 2009 2:34 am |
|
|
TorrentHKU
Loose Canon
Joined: Sun Mar 29, 2009 11:07 pm Posts: 2992 Location: --------------->
|
Re: Glowing Laser Beam Trail
You have 3 seconds to live before I kill you for besmirching the holy visiage that is the Matilda Laser Revolver.
|
Mon Nov 30, 2009 2:44 am |
|
|
dragonxp
Joined: Wed Sep 09, 2009 3:16 am Posts: 3032 Location: Somewhere in the universe
|
Re: Glowing Laser Beam Trail
Gah, i gave him credits, however upon p3lb0x's request i will remove me energy gatling and ion sniper from X2 technologies.
|
Mon Nov 30, 2009 2:47 am |
|
|
Metal Meltdown
Banned
Joined: Thu May 14, 2009 9:22 pm Posts: 826 Location: Lookin' forward to mocking people on Jan 1st 2013.
|
Re: Glowing Laser Beam Trail
Hyper's point was that your version looks... sucky. To use a mild expression.
|
Mon Nov 30, 2009 7:14 am |
|
|
Geti
Joined: Sun Jul 13, 2008 9:57 am Posts: 4886 Location: some compy
|
Re: Glowing Laser Beam Trail
Well, the sprite is crap but whatever, doesnt matter. what you want to do OP is basically store the last position it was in, and use that to draw a line of particles to where it is now. something like Code: --NOT GUARANTEED TO WORK TYPED LATE AT NIGHT FROM NOTHING function Create(self) self.oldpos = self.Pos --set the old position end
function Update(self) self.numberofdivisions = math.random(4,6) --some randomness never hurt. for i = 1, self.numberofdivisions do local particle = CreateMOPixel("<PIXEL PRESETNAME HERE>", "<RTENAME>.rte") particle.Pos = self.Pos - (SceneMan:ShortestDistance(self.Pos,self.oldpos,true) * (i/ (self.numberofdivisions + 1))) --the above should position a mopixel (which i assume you're using) a fraction of the distance the particle has traveled. particle.Vel = self.Vel * (math.random(8,12) / 10) --more random, this time velocity MovableMan:AddParticle(particle) end self.oldpos = self.Pos --set the old position again, at the end of the function so it works for next time, but doesnt ♥♥♥♥ it up now end Should work, used a simmilar method for naxx's acid thing's trails. have a play around with it.
|
Mon Nov 30, 2009 12:01 pm |
|
|
dragonxp
Joined: Wed Sep 09, 2009 3:16 am Posts: 3032 Location: Somewhere in the universe
|
Re: Glowing Laser Beam Trail
o.0, you mean sprite or glow used, (sprite sucks i know )
|
Mon Nov 30, 2009 7:25 pm |
|
|
Geti
Joined: Sun Jul 13, 2008 9:57 am Posts: 4886 Location: some compy
|
Re: Glowing Laser Beam Trail
Sprite. Way too blocky and too much contrast for anything but a NES sprite that ABSOLUTELY NEEDED TO HAVE TWO COLOUR ZONES. Glow was okay. OP's Sprite is pretty bad too upon reflection, too much gradient. Have a look at the vanilla weapons and how they do lighting for ways to make it better looking, OP.
|
Mon Nov 30, 2009 10:28 pm |
|
|
Rocksonic
Joined: Sat Jan 10, 2009 1:55 am Posts: 75
|
Re: Glowing Laser Beam Trail
Kay, I used the script and it gave me the same results as the .ini coding I had before. (a dotted line) Is there anyway to make the glows closer together?
As for the sprite, thats just a placeholder.
|
Thu Dec 03, 2009 10:07 pm |
|
|
Geti
Joined: Sun Jul 13, 2008 9:57 am Posts: 4886 Location: some compy
|
Re: Glowing Laser Beam Trail
i ♥♥♥♥ a few things up, most likely.
looking at it it doesnt seem like it though, does the console throw any errors. i can't be sure without running it and saying "oh god im an idiot fix this huge problem" but it looks okay from here.
|
Thu Dec 03, 2009 10:15 pm |
|
|
Rocksonic
Joined: Sat Jan 10, 2009 1:55 am Posts: 75
|
Re: Glowing Laser Beam Trail
Nope, no errors. Here's the mod again with the script included this time.
Attachments:
BOX.rte.zip [94.93 KiB]
Downloaded 213 times
|
Thu Dec 03, 2009 10:38 pm |
|
|
Geti
Joined: Sun Jul 13, 2008 9:57 am Posts: 4886 Location: some compy
|
Re: Glowing Laser Beam Trail
I'll look at it at some point this weekend or next week, going out tonight and today.
|
Fri Dec 04, 2009 1:04 am |
|
|
Rocksonic
Joined: Sat Jan 10, 2009 1:55 am Posts: 75
|
Re: Glowing Laser Beam Trail
Sooooo.... any ideas?
|
Thu Dec 10, 2009 6:09 pm |
|
|
|