ItsMods

Full Version: Lines
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
Pages: 1 2
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
Huh why do you need _painter? Also line() needs developer_script? - Good job
(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.
coool
btw, screen....
(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
(01-17-2012, 16:44)Se7en Wrote: [ -> ]coool
btw, screen....

A line is a line, do you need a screenshot of a line? Huh
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
(01-17-2012, 16:44)Se7en Wrote: [ -> ]coool
btw, screen....

Here screenshot for you:
[Image: unbenann2t.png]
i guess it could be usefull ofcrouse, but where would it be usefull for?
(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
Pages: 1 2