![]() |
|
[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, ![]() 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.gscIf 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, . 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,
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 Ahhh, so that's why it didn't work... Because I tried it before and the function didn't work... Nothing happened at all ![]() RE: Lines - Yamato - 01-17-2012 (01-17-2012, 16:44)Se7en Wrote: coool A line is a line, do you need a screenshot of a line?
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 Here screenshot for you:
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 |