PDA

View Full Version : Laser sight


Robert
02-01-2004, 06:38 AM
How do I make a laser sight for my weapon?

Kozak
02-01-2004, 06:57 AM
I think There was a topic about it a few days ago. Try searching.

Robert
02-01-2004, 11:01 AM
No, that was about a laser weapon... the subject was something like Laser weapon(not laser sight) How-to

Aztec
02-01-2004, 11:10 AM
Try making a laser sight skin item or making one in PFX for it

Rico
02-01-2004, 11:44 AM
Smple, just make the weapon you want to have the laser sight fire a projectile on all the weapon animations (fire, default, reload, etc) have the projectile be invisible and have it leave a particle trail like the molotov cocktail.

There may be more refined ways of doing it but this is the easiest i could think up.

Robert
02-01-2004, 12:13 PM
I don't get it http://forums.3drealms.com/ubbthreads/images/graemlins/doh.gif I'm not a master in MP2 actually

Kozak
02-01-2004, 01:34 PM
Mmm I posted it somewhere but here is it again:
You need a pfx for the laser .
Okay for making a new laser sight weapon :
add the new weapon too maxpayne:
then go to your weapon folder ( \database\weapons).
Open up your weapon.txt , Scroll down and you will see something that is called animation set ( here are the animations stored of your weapon ). Look for :
WEAPONANIM_DEFAULT . Under the tag called [properties] place this :
[Message] Frame = 0; String = "this->P_CreateProjectile ( laser, 1 );"; ( now it creates a laser on frame 0 , if you have a very short laser pfx you need to create more on different frames)

Do his also with :
WEAPONANIM_SHOOT
WEAPONANIM_PLAYERSHOOT
WEAPONANIM_RELOAD

okay, this file is done.

Go to your projectile folder (\database\projectiles):
Copy the BulletBerettaSingle_Player and reame .txt file to laser. Open up the text file:
Look for "..\SharedMeshes\BulletBeretta_L0.kf2"; and replace that with :"..\dummy\dummy_l0.kf2"; and do it again with the thing below that.
then add a tag called [properties] :
it should loo like this :

[Animationset]
{
[Animation]
Index = PROJECTILEANIM_DEFAULT;
Filename = "..\SharedMeshes\BulletBeretta_L0.kf2";

[Properties]
{

}

}

Then at this line between the [properties] tag :
thiis->ps_starteffect(laser,\"\");"; okay, it's done now you only need to implement the laserpfx to the particle.txt located at : database\particles\particle.txt .
*****note****** this is not tested , hope you understand this

Rico
02-01-2004, 02:16 PM
Yes, follow Kozak's steps, that's exactly what i mean.

visionary
03-09-2004, 05:50 PM
I followed Kozak's method, and realized he knew not what he was talking about... Typical. I wish people would post things they actually knew worked. I found out how to do it on my own in the end, and using a projectile effect is kind of redundant. Just make a particle effect and attach it to your gun. Going the way of projectiles causes way too many errors. Check out this post...

Laser Sight (http://forums.3drealms.com/ubbthreads/showflat.php?Cat=&Number=491853&page=0&view=collapsed&sb=5&o=93&fpart=1)

Kozak
03-10-2004, 07:57 AM
I don't know what I'm talking about?. That is the realistic way of doing it. And a particle fx goes through walls so if you have a long particle fx ( that is realistic) it will shine through walls. Okay , this is not bad when you play with your gun but when enemies have it then you will see thing shining through walls and believe that doens't looks so great. So think wisly before you speak again that somebody doens't know what he is talking about .

visionary
03-11-2004, 05:10 PM
I was trying not to state it was a wrong way, but the way you posted it was incorrect... it caused errors when followed closely... I agree though, and I was wrong to say that PFX were the way to do it... You know what would be nice, is if they incorporated particle collisions into the engine. Like the Unreal series, or Half-Life 2.