Author Topic: How do I add a laser to a weapon?  (Read 1057 times)

How do I add a laser to a weapon? Please help.

What are you asking exactly becuase it sounds like all you want to do is change the projectile.


Well that probably is a better idea.

I want to make a pistol that has a laser pointing at the object that I am about to shoot. Like Bushido's .880 Rifle.

Ok i think i need to add on to that learn to code part learn to read to, or start simple or post in request.

Some people think it's so easy.

It is when you have years of experience.



Post any script fragments that might help.

Can't you find them yourself?

Well since nobody has, I'll just straight forward answer your question.

Code: [Select]
%start = %obj.getEyeVec();
%vec = vectorScale(%obj.getEyeVector(), DISTANCE);
%end = vectorAdd(%start, %vec);


This shoots a raycast.
« Last Edit: October 12, 2009, 11:49:15 PM by Deep2 »

No it doesn't. It causes a console error and then returns a point several units in the way you're looking away from (0,0,0).

If you want it "like the .880 Rifle", have you actually looked at the .880 rifle script? Post your current script and why it doesn't work, then we can help fix it rather than spoon-feed you all the answers.