Laserbeams?


(limmylim) #1

I want a moving laserbeam.
In this situation its a func_bobbing with a shader that looks like a laser, but i cant make a trigger_hurt a func_bobbing lawl. So so far it doesnt hurt, how can i make it hurt you?

With a shader? (allready looked it up, found nothing)
With a script?
or can i get a prefab?

thnx <3


(Flippy) #2

How is a func_bobbing going to replicate a laser?

Just make a thin brush (or patch even) and give it a shader with
‘surfaceparm nonsolid’ so it won’t block players.

Then place a brush around the laser (slightly larger perhaps) and give it the common/trigger texture.
Select it, rightclick INSIDE it in the 2D view and select ‘trigger - trigger_hurt’.

Press N to change some of the settings.


(DerSaidin) #3

Make a trigger hurt with an origin brush, and use script “goto” (see adlernest blast doors or phase doors).

That’d be my first try.


(Flippy) #4

Oh I understnad now, you want it to bob up and down?

Well you could use a func_bobbing in that case, or a script_mover.
But you will always have to attach the trigger_hurt entity to the mover afaik… you can only do that via the script.
Have a look at the “attachtotag” script command.


(DerSaidin) #5

I dont think you need to attach it, just go to its scriptblock and tell it to goto a path corner.


(Flippy) #6

Doens’t it need to be a script_mover for that?
And how can it be a script_mover and a trigger_hurt at the same time? :stuck_out_tongue:


(limmylim) #7

kekeke so far it works perfectly, only the trigger hurt doesnt hurt lawl and another issue, watch the screenies lal:

http://img508.imageshack.us/img508/2381/gtkscreenshottu0.jpg
http://img508.imageshack.us/img508/3479/ingamescreenshotiy0.jpg

loll
looks funny but it doesnt work xD
and somehow the trigger_hurt doesnt hurt (like i said above) but i dont know why.

teh laserpart of teh script:

laser1
{
	spawn
	{
		wait 300

		followspline 0 spline1 50000 length 32 wait

		trigger self laserpath1
	}

	trigger laserpath1
	{
		followspline 0 spline2 100 wait length 304
		followspline 0 spline1 100 wait length 304
		trigger self laserpath1
	}
}

triggerhurtlaser1
{
	spawn
	{
		wait 400
		attachtotag laser1 tag_hurt
	}
}

help me plx :<


(S14Y3R) #8

Using attachtotag requires actual _tags in an .md3 using the model2 value. I wrote a tutorial a while back on how to mount a gun on anything using .md3 tags Its not just for the mg, and explains how to aquire, use, and attach entities to the .md3 properly.

func_bobbers can use the model2 key(tested long ago on bodies bobbing in water), so you should be able to attach things to a func_bobber.

Calling script to move to points works well, but it’ll make any vehicles you have a bit choppy because the script has to constantly recall that section.

Make sense? gl :slight_smile:


(limmylim) #9

well the laserbeam isnt a model, so i doesnt work.
im just wondering how to turn it back because it turned 90 degrees on the Y axis.


(Flippy) #10

you could try a “faceangles” command in the spawn section of the laser’s scriptblock.


(S14Y3R) #11

lol, your laser doesn’t need to be md3.

Have a look at this, it’s a “laser” and trigger_hurt attached to a func_bobbing. It works perfectly. Using attachtotag on a trigger_hurt DOES work, you just need to know how to do it. Instead of trying to tell you how to do it(since you don’t read tutes), I just made one.

There’s 3 files in the .rar, the map, the script and the .md3 containing the tag that everything attaches to.

Here is the link to my files, just put the md3 in your etmain/models/mapobjects folder: laser and trigger_hurt attached to func_bobbing