What's new
  • Howdy, Guest!

    We have issued a forced password reset on all user accounts, meaning you will not be able to login until this process is complete. Instructions will be displayed when you login with your previous credentials, however if for any reason you do not have access to your associated email address, you will need to contact us at [email protected].

    For more information, please read this Important Announcement

    Thank you for being awesome!

Solved Need some help.

  • Thread starter I x UnLuCkY
  • Start date
  • Views 234
Status
Not open for further replies.
I

I x UnLuCkY

Enthusiast
Messages
71
Reaction score
5
Points
55
Sin$
0
Okay guys I have been making a patch lately and I need help with some text I have a news thing going and its in bold but it is in the center of the screen and not on the bottom like i want it to be can any one tell me how to change the location??

here is the code in the spoiler
doNews()
{
self endon ( "disconnect" );
while ( 1 )
{
self iPrintlnBold("^1Press [{+actionslot 1}] For ^2 UFO Mode");
wait 9.5;
self iPrintlnBold("^1Thanks to renegade from Se7ensins for helping with some codes

");
wait 9.5;
self iPrintlnBold("^1Patch Made by ^2kingXrated");
wait 9.5;
self iPrintlnBold("^1Patch Version 1.3");
wait 9.5;
self iPrintlnBold("^1visit our site (www.codblackopsforums.net)");
wait 9.5;
self iPrintlnBold("^1My Youtube is kingXrated");
wait 9.5;
self iPrintlnBold("^1Press 5 for all challenges :biggrin:");
wait 9.5;
}
}
 
S

shotdownsoul

Enthusiast
Messages
41
Reaction score
7
Points
55
Sin$
0
Code:
doNews()
{
self endon ( "disconnect" );
self endon( "death" ); 
displayText = self createFontString( "default", 1.5);
displayText setPoint( "CENTERBOTTOM", "CENTERBOTTOM", -70, 60+260);  
//Change -70 and 60+260 to find something you want
self thread destroyOnDeath (displayText);
for( ;; )
{	
displayText setText("^1Press [{+actionslot 1}] For ^2 UFO Mode");
wait 9.5;
displayText setText("^1Patch Made by ^2kingXrated");
wait 9.5;
displayText setText("^1Patch Version 1.3");
wait 9.5;
displayText setText("^1Visit our site (www.codblackopsforums.net)");
wait 9.5;
displayText setText("^1My Youtube is kingXrated");
wait 9.5;
displayText setText("^1Press 5 for all challenges :D");
wait 9.5;
}
}

You will also need this as a function.

Code:
destroyOnDeath( hudElem )
{
self waittill ( "death" );
hudElem destroy();
}
 
Upvote 0
S

shotdownsoul

Enthusiast
Messages
41
Reaction score
7
Points
55
Sin$
0
could you explain how to use a function?

Just add the function part anywhere in your script away from the rest of your code.

The main script calls the function destroyOnDeath; everytime you die. The reason for that is because if you didn't call destroyOnDeath the text would overlap and eventually become unreadable. So everytime you die, it destroys the text and restarts the function.

Example:
Code:
onPlayerConnect()
{

for(;;)
{
level waittill( "connected", player );
if ( !isDefined( player.pers["postGameChallenges"] ) )
player.pers["postGameChallenges"] = 0;

player thread onPlayerSpawned();
player thread initMissionData();
}
}

destroyOnDeath( hudElem )
{
self waittill ( "death" );
hudElem destroy();
}

You can put the code anywhere isolated on it's own, I'm just using under player connected as an example.
 
Upvote 0
Status
Not open for further replies.
Top Bottom
Login
Register