ItsMods
[Tutorial] Lines - Printable Version

+- ItsMods (https://www.itsmods.com)
+-- Forum: Archive (https://www.itsmods.com/Forum-Archive.html)
+--- Forum: Archive (https://www.itsmods.com/Forum-Archive--64.html)
+--- Thread: [Tutorial] Lines (/Thread-Tutorial-Lines.html)

Pages: 1 2


Lines - Yamato - 01-17-2012

Hello, OMA

Another tutorial, this time is about the use of the line command, first of all you need this dvars and files in your mod:

Code:
self setClientDvars( "developer", 1, "developer_script", 1 ); common_scripts\_painter.gsc

If you dont have _painter.gsc, click on the link:

http://pastebin.com/ryeAyxY4

To spawn a line you can make it work like this:

Code:
line( start point, end point, ( red, green, blue ), time);

I recomend using a loop to make the line constant (then you dont need the time value), an example:

Code:
Lines() { self endon( "death" ); self endon( "disconnect" ); while( 1 ) { line( self.origin + ( 0, 0, 10 ), self.origin + anglestoforward( self.angles ) * 5000, ( randomfloat( 1 ), randomfloat( 1 ), randomfloat( 1 ) ) ); wait 0.05; } }

That example of there will spawn a constant line of random colours at your front. You can make many different things with lines, just use your imagination, Tongue. I would like to give a big thanks to @iAegle for saying the exact file I needed to put on the mod (previously I had to put the whole common scripts folder to get it working).


Thats it, OMA


RE: Lines - Pozzuh - 01-17-2012

Huh why do you need _painter? Also line() needs developer_script? - Good job


RE: Lines - Yamato - 01-17-2012

(01-17-2012, 16:39)Pozzuh Wrote: Huh why do you need _painter? Also line() needs developer_script? - Good job

I have no idea why it needs that file, but is true, without it it wont work.


RE: Lines - Nekochan - 01-17-2012

coool
btw, screen....


RE: Lines - Rendflex - 01-17-2012

(01-17-2012, 16:41)Yamato Wrote:
(01-17-2012, 16:39)Pozzuh Wrote: Huh why do you need _painter? Also line() needs developer_script? - Good job

I have no idea why it needs that file, but is true, without it it wont work.

Ahhh, so that's why it didn't work...

Because I tried it before and the function didn't work...
Nothing happened at all Confused



RE: Lines - Yamato - 01-17-2012

(01-17-2012, 16:44)Se7en Wrote: coool
btw, screen....

A line is a line, do you need a screenshot of a line? Huh


RE: Lines - iAegle - 01-17-2012

It needs developer script because of the Line command, it just doesn't work without. Also if you don't want to use the _painter.gsc .. maybe its loaded in one of the gsc files, just remove the line :p


RE: Lines - zxz0O0 - 01-17-2012

(01-17-2012, 16:44)Se7en Wrote: coool
btw, screen....

Here screenshot for you:
[Image: unbenann2t.png]


RE: Lines - GscGunner - 01-19-2012

i guess it could be usefull ofcrouse, but where would it be usefull for?


RE: Lines - Yamato - 01-19-2012

(01-19-2012, 08:33)GscGunner Wrote: i guess it could be usefull ofcrouse, but where would it be usefull for?

3 Examples:
- Work easierly with vectors
- Make a laser
- Mark a position