Data Realms Fan Forums
http://45.55.195.193/

Glowing Laser Beam Trail
http://45.55.195.193/viewtopic.php?f=75&t=17227
Page 1 of 3

Author:  Rocksonic [ Fri Nov 27, 2009 4:49 am ]
Post subject:  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:

Image

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/idrd5x


I didn't know wether this belonged in mod making or requests, so I hope this is the right place.

Author:  411570N3 [ Fri Nov 27, 2009 5:04 am ]
Post subject:  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.

Author:  Duh102 [ Fri Nov 27, 2009 5:48 am ]
Post subject:  Re: Glowing Laser Beam Trail

This what you're looking for? It requires a bit of Lua, but is fairly simple to customize.

Author:  dragonxp [ Mon Nov 30, 2009 2:34 am ]
Post subject:  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 HERE

p3lb0x's matilda revolver gif:
Image

Me stealing it xD:
[img]CUT%20OUT%20TO%20AVOID%20FLAMING%20xD[/img]

Author:  TorrentHKU [ Mon Nov 30, 2009 2:44 am ]
Post subject:  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.

Author:  dragonxp [ Mon Nov 30, 2009 2:47 am ]
Post subject:  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.

Author:  Metal Meltdown [ Mon Nov 30, 2009 7:14 am ]
Post subject:  Re: Glowing Laser Beam Trail

Hyper's point was that your version looks... sucky. To use a mild expression.

Author:  Geti [ Mon Nov 30, 2009 12:01 pm ]
Post subject:  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.

Author:  dragonxp [ Mon Nov 30, 2009 7:25 pm ]
Post subject:  Re: Glowing Laser Beam Trail

o.0, you mean sprite or glow used, (sprite sucks i know :roll: )

Author:  Geti [ Mon Nov 30, 2009 10:28 pm ]
Post subject:  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.

Author:  Rocksonic [ Thu Dec 03, 2009 10:07 pm ]
Post subject:  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.

Author:  Geti [ Thu Dec 03, 2009 10:15 pm ]
Post subject:  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.

Author:  Rocksonic [ Thu Dec 03, 2009 10:38 pm ]
Post subject:  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 215 times

Author:  Geti [ Fri Dec 04, 2009 1:04 am ]
Post subject:  Re: Glowing Laser Beam Trail

I'll look at it at some point this weekend or next week, going out tonight and today.

Author:  Rocksonic [ Thu Dec 10, 2009 6:09 pm ]
Post subject:  Re: Glowing Laser Beam Trail

Sooooo.... any ideas?

Page 1 of 3 All times are UTC [ DST ]
Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group
http://www.phpbb.com/