Author |
/n? |
Barthezzz Fleet Admiral
Joined: May 31, 2001 Posts: 5630 From: The Netherlands
| Posted: 2003-02-09 04:36  
Yeah a q about scripting, In the Pushchat function in the tutorial you see /n every now and then.
Some lines of text have it at the start and end some dont have it at all and some have it either at the front or end. (See axamples below)
What does it do? (Cant find it in the scripting ref)
Quote:
| pushChat( "Press the ENTER key to begin the tutorial.n" ); |
|
Quote:
| pushChat( "nPress the ENTER key to continue.n" ); |
|
Quote:
| pushChat( "nFor this training we will give you this free ECCM (Please do give it back afterwards =P)" ); |
|
_________________
|
chris aka sunshine Cadet
Joined: May 29, 2001 Posts: 1649 From: Germany
| Posted: 2003-02-09 04:39  
n will result in an line-break..
pushChat( "Press the ENTER n key to continue.n" );
looks like:
Press the ENTER
key to continue
_________________ Christian 'sunshine' Weyand
|
Barthezzz Fleet Admiral
Joined: May 31, 2001 Posts: 5630 From: The Netherlands
| Posted: 2003-02-09 04:40  
Ah tnx
But if i have this:
Quote:
| pushChat( "To counter the K'luth cloak you 0 need ECCM. ECCM can be bought at a starport and placed in a Special slot on your ship." );
pushChat( "nECCM raises the signature of all ships nearby. K'luth need a signature of 0 if they want to be able to fly around unseen." );
pushChat( "nFor this training we will give you this free ECCM (Please do give it back afterwards =P)" ); |
|
The pushchat things are all in diffrent lines, do they still need the /n?
_________________
Website || Fleetpage
[ This Message was edited by: Barthezzz on 2003-02-09 04:41 ]
_________________
|
Shigernafy Admiral
Joined: May 29, 2001 Posts: 5726 From: The Land of Taxation without Representation
| Posted: 2003-02-09 06:55  
I think different pushchat automatically has a line break after it. So if you have multiple pushChat()s, it would have line breaks between them.. its just an option between whether you want to have have one long pushChat(something /n something /n something) or multiples to make it a bit more readable.
So basically, assume an invisible /n at the end of the pushChat().
_________________ * [S.W]AdmBito @55321 Sent \"I dunno; the French had a few missteps. But they're on the right track, one headbutt at a time.\"
|
Barthezzz Fleet Admiral
Joined: May 31, 2001 Posts: 5630 From: The Netherlands
| Posted: 2003-02-09 07:28  
cool.
_________________
|
Chromix Cadet
Joined: June 29, 2001 Posts: 3052
| Posted: 2003-02-09 08:43  
Another difference is: Lines by pushChat() are logical blocks, so when you write a single block with 30 lines it disappears from the screen quite fast, but if you use pushChat for every single line they'll disappear one by one.
_________________
|