View unanswered posts | View active topics It is currently Fri Dec 27, 2024 11:23 am



Reply to topic  [ 31 posts ]  Go to page 1, 2, 3  Next
 Glowing Laser Beam Trail 
Author Message
User avatar

Joined: Sat Jan 10, 2009 1:55 am
Posts: 75
Reply with quote
Post 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.


Fri Nov 27, 2009 4:49 am
Profile
User avatar

Joined: Wed Jan 07, 2009 10:26 am
Posts: 4074
Location: That quaint little British colony down south
Reply with quote
Post 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
Profile WWW
happy carebear mom
User avatar

Joined: Tue Mar 04, 2008 1:40 am
Posts: 7096
Location: b8bbd5
Reply with quote
Post 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
Profile
User avatar

Joined: Wed Sep 09, 2009 3:16 am
Posts: 3032
Location: Somewhere in the universe
Reply with quote
Post 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]


Last edited by dragonxp on Mon Nov 30, 2009 7:54 pm, edited 1 time in total.



Mon Nov 30, 2009 2:34 am
Profile
Loose Canon
User avatar

Joined: Sun Mar 29, 2009 11:07 pm
Posts: 2992
Location: --------------->
Reply with quote
Post 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
Profile WWW
User avatar

Joined: Wed Sep 09, 2009 3:16 am
Posts: 3032
Location: Somewhere in the universe
Reply with quote
Post 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
Profile
Banned
User avatar

Joined: Thu May 14, 2009 9:22 pm
Posts: 826
Location: Lookin' forward to mocking people on Jan 1st 2013.
Reply with quote
Post 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
Profile YIM
User avatar

Joined: Sun Jul 13, 2008 9:57 am
Posts: 4886
Location: some compy
Reply with quote
Post 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
Profile WWW
User avatar

Joined: Wed Sep 09, 2009 3:16 am
Posts: 3032
Location: Somewhere in the universe
Reply with quote
Post Re: Glowing Laser Beam Trail
o.0, you mean sprite or glow used, (sprite sucks i know :roll: )


Mon Nov 30, 2009 7:25 pm
Profile
User avatar

Joined: Sun Jul 13, 2008 9:57 am
Posts: 4886
Location: some compy
Reply with quote
Post 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
Profile WWW
User avatar

Joined: Sat Jan 10, 2009 1:55 am
Posts: 75
Reply with quote
Post 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
Profile
User avatar

Joined: Sun Jul 13, 2008 9:57 am
Posts: 4886
Location: some compy
Reply with quote
Post 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
Profile WWW
User avatar

Joined: Sat Jan 10, 2009 1:55 am
Posts: 75
Reply with quote
Post 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
Profile
User avatar

Joined: Sun Jul 13, 2008 9:57 am
Posts: 4886
Location: some compy
Reply with quote
Post 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
Profile WWW
User avatar

Joined: Sat Jan 10, 2009 1:55 am
Posts: 75
Reply with quote
Post Re: Glowing Laser Beam Trail
Sooooo.... any ideas?


Thu Dec 10, 2009 6:09 pm
Profile
Display posts from previous:  Sort by  
Reply to topic   [ 31 posts ]  Go to page 1, 2, 3  Next

Who is online

Users browsing this forum: Bing [Bot]


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to:  
Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group.
Designed by STSoftware for PTF.
[ Time : 0.047s | 17 Queries | GZIP : Off ]