Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Tutorial Lines
#1
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
Reply

#2
Huh why do you need _painter? Also line() needs developer_script? - Good job
[Image: MaEIQ.png]
Reply

#3
(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.
Reply

#4
coool
btw, screen....
C++/Obj-Cdeveloper. Neko engine wip
Steam: Click
Reply

#5
(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
Reply

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

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

#7
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
(08-10-2011, 12:58)Pozzuh Wrote:
Se7en Wrote:Stealed, from cod4 mod ...
look who's talking

[Release] Old School Mod v2.2
[Release] Scroll menu

Reply

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

Here screenshot for you:
[Image: unbenann2t.png]
[Image: azuw.jpg]
Reply

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

#10
(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
Reply



Possibly Related Threads…
Thread Author Replies Views Last Post
  [Request] Chat Lines Extended xDarkPrince 3 3,147 09-20-2012, 19:48
Last Post: xDarkPrince
  Amazing lines Bloopbloop 5 3,894 05-06-2011, 08:12
Last Post: AZUMIKKEL
  [Tutorial] Draw Vectors Lines Using Engine d0h! 1 2,597 01-31-2011, 12:33
Last Post: Eekhoorn
  [Tutorial] Drawing Lines with the engine d0h! 0 2,016 01-26-2011, 17:29
Last Post: d0h!

Forum Jump:


Users browsing this thread:
1 Guest(s)

Forum Powered By MyBB, Theme by © 2002-2024 Melroy van den Berg.