- Quick Links -


Jedi Knight modifying site

Visitor No.72282
Since July 1999

Theme :

Massassi Temple MILLENNIUM
LucasArts Entertainment Company

- Random Picture -

Boss Key

Boss Key

Forum Projects Documents Features Extra Links
Making a Laser Pointer

DOWNLOAD


1

Let's make a laser pointer shall we?

First of all, the way it works is that you create a middle length thin 3do rapidly in 1 line, so eventually it looks like a laser.

And for that we will use "trailthing" as it does with force lightning and concussion secondary fire.


2

In this step, let's make a template so that it will be a laser when FireProjectile is used in a cog.

Open up an original "static.jkl" located in the "res2.gob". Add the template title.

   ###### Template information ####
   Section: templates
   World templates 10

I will only explain and place the necessary part of templates.

   +laser_trail   _weapon   collide=0 timer=0.02 thingflags=0 model3d=laser.3do
   +laser      _weapon   collide=0 trailthing=+laser_trail elementsize=0.3 typeflags=0xa40d range=10 timer=0.02 thingflags=0

Make sure you add the parent templates as well. Here are each of the explanations.

"collide=0" makes it so, it won't touch any objects, otherwise it will stop the elevator etc if the laser gets in the way.

"timer=0.02" is to kill the previous laser, so it won't be lasers everywhere left behind, but long enough so it trails your move.

You don't need any "thingflags", it needs no special attributes.

"trailthing" is the one that trails it and the template is right above it.

"element size" is the distance between each trailthing, so consider it by the length of the 3do that you make.

"typeflag(weapon flag)" is needed for the trailthing to work.

"range" is the distance how much it trails, so if set too short, it will end right there, so set it long enough.

Done with templates.


3

Just need to add a few simple lines in a weapon cog and it will be a laser pointer.

Here, we'll use weap_bryar.cog. Open it up. Let's make it so it starts the pointer when selected and disables it when deselected. And add a line in the killed message, so it also stops when killed.

In the selected message add

SetPulse(0.01);

and in the deselected and killed message add

SetPulse(0);

Make sure you add "killed" and "pulse" messages and "laser=+laser" in the symbols, so the projectile can be referred in the pulse.

And last in the pulse message add the FireProjectile line to fire the laser continuously.

FireProjectile(player, laser, -1, -1, '0 0 0', '0 0 0', 0, 0, 0, 0);

All for cog.


4

And for the last part you need to make a thin laser 3do that should look red, but I will let you do that.

After you're done with it, launch JK and see what you have just done with yourself.

Enjoy.


Resources

weap_bryar.cog

laser.3do

static.jkl


Forum Projects Documents Features Extra Links

Top - Home - Back

PHP Apache Valid XHTML 1.0! Valid CSS!

This site is developed using PHP under Apache server
with XHTML, JavaScript, CSS and Cookie technology.

Certain parts of this site require Cookie support.

This site is best viewed with Internet Explorer 5.5, Netscape 6.0, Opera 6.0 or Mozilla 1.0 and above
at resolution 800 * 600 and higher.

Nothing on this site is made, distributed, or supported by LEC.
Please use and download all materials at your own risk.

© 1999-2004 Hideki.

This page was last modified on Sat, 30 Jul 2011 17:28:41 +0000.