Results 1 to 7 of 7
  1. #1
    Banned
    Join Date
    May 2011
    Posts
    917
    Points
    1,182
         User Info     Contact     Gamer ID
    Join Date
    May 2011
    Posts
    917
    Points
    1,182

    Default [Sequel][TUT] How to script Final

    Ok, I know I haven't done this in forever, but I have had lots of stuff to do. Today I will wrap up the sequel by teaching you how to use it all.

    1. Syntax. Ok so lets add us a Syntax that was taught at the beginning
    Code:
    Example()
    {
    }
    Remember with every opening curly braces there is another closing curly brace.
    2. Loop. Now lets get us a loop in there as I am going to make a repeating script
    Code:
    Example()
    {
         for(;;)
         {
         }
    }
    Or
    Example()
    {
         while( 1 )
         {
         }
    }
    Now lets add us some if's and else if's

    Code:
    Example()
    {
        for(;;)
        {
              if( self.example == 1 || self.example != 0 )
              {
                    for( i = 0; i < self.arrayExample.size; i++ )
                    {
                         iPrintIn( self.arrayExample[i] );
                    }
              else if( self.example == 0 || self.example != 1 )
              {
                   while( 1 )
                   {
                         iPrintIn( "I learned how to script!" );
                   }
              }
        }
    }
    This is our variables
    Our if statement
    Or statement
    Not equal
    Our array that we will add later
    3. Arrays. Now we will add our array.
    Code:
    Example()
    {
        for(;;)
        {
              if( self.example== 1 || self.example !=0 )
              {
                    for( i = 0; i < self.arrayExample.size; i++ )
                    {
                         iPrintIn( self.arrayExample[i] );
                         wait 5;
                    }
              else if( self.example == 0 || self.example != 1 )
              {
                   while( 1 )
                   {
                         iPrintIn( "I learned how to script!" );
                   }
              }
        }
    }
    Array()
    {
         self.arrayExample = [];
         self.arrayExample[1] = "hello";
         self.arrayExample[2] = "world";
         self.arrayExample[3] = "I made a script";
    
    }
    Initializer
    Number of data
    Our array
    We are getting the size of our Array
    4.Variables. Now we will set our variable.
    Code:
    self.example = 1;
    Value
    Name of variable
    Prefix

    That's all guys. leave a comment if you want me to further explain something, Or submit your try's! Have a great one guys and I hope this helped

    0 Not allowed! Not allowed!

  2. #2
    ✝ Pursuit of Happiness ✝ Sh0x's Avatar

    Badge

    Join Date
    May 2012
    Location
    North Carolina
    Posts
    2,843
    Points
    3,181
         User Info     Contact     Gamer ID
    Join Date
    May 2012
    Location
    North Carolina
    Posts
    2,843
    Points
    3,181
    Gamer IDs

    Gamertag: iiSh0x

    Contact info:

    Youtube Channel: http://www.youtube.com/zSh0x

    Default

    Great job. This is a really good tutorial for beginners. Maybe you should explain loops a little more so they know what the mean ..... such a for(;;) is an infinite loop and stuff but great job!

    Sent from my MOTWX435KT using Tapatalk 2

    0 Not allowed! Not allowed!





  3. #3
    Blink 182 Give Me Boners mynameisjosh's Avatar
    Join Date
    Oct 2011
    Location
    Massoftwoshits
    Posts
    1,377
    Points
    3,110
         User Info     Contact     Gamer ID
    Join Date
    Oct 2011
    Location
    Massoftwoshits
    Posts
    1,377
    Points
    3,110
    Gamer IDs

    Gamertag: JennaTollzZ PSN ID: HuuughGRection

    Default

    I FINALLY UNDERSTAND ARRAY'S. It just clicked in my head. I get it now, .

    Thank you for these. They have helped a lot. I even have them bookmarked, Lol.

    Thanks again.

    0 Not allowed! Not allowed!
    Quote Originally Posted by Insane.Dragon View Post
    I fucked a shark once.
    Quote Originally Posted by RED 58 View Post
    i like the sig but i hate russ...
    im seeing conflict here

  4. #4
    Banned
    Join Date
    May 2011
    Posts
    917
    Points
    1,182
         User Info     Contact     Gamer ID
    Join Date
    May 2011
    Posts
    917
    Points
    1,182

    Default

    Quote Originally Posted by Inspired One View Post
    Great job. This is a really good tutorial for beginners. Maybe you should explain loops a little more so they know what the mean ..... such a for(;;) is an infinite loop and stuff but great job!

    Sent from my MOTWX435KT using Tapatalk 2
    http://www.codeleakers.com/showthrea...-script-part-4
    Full description.

    0 Not allowed! Not allowed!

  5. #5
    I'm Unoriginal
    I Steal Other People's Work
    I Hijack Other People's Accounts

    Join Date
    Jun 2012
    Posts
    509
    Points
    877
         User Info     Contact     Gamer ID
    Join Date
    Jun 2012
    Posts
    509
    Points
    877
    Gamer IDs

    Gamertag: Deranged Modz Steam ID: None

    Default

    Thanks for the great tut bro

    0 Not allowed! Not allowed!

  6. #6
    Banned
    Join Date
    May 2011
    Posts
    917
    Points
    1,182
         User Info     Contact     Gamer ID
    Join Date
    May 2011
    Posts
    917
    Points
    1,182

    Default

    Quote Originally Posted by Deranged View Post
    Thanks for the great tut bro
    No problem, I hope to see you in the mods posting up some scripts!

    0 Not allowed! Not allowed!

  7. #7
    Stand em up
    Knock em down.

    Badge

    Join Date
    Oct 2011
    Location
    In Yur Closet
    Posts
    1,579
    Points
    2,828
         User Info     Contact     Gamer ID
    Join Date
    Oct 2011
    Location
    In Yur Closet
    Posts
    1,579
    Points
    2,828
    Gamer IDs

    PSN ID: xRudyCrush Steam ID: rudyypoo

    Default

    What else can be used in arrays? I see you used text, but i'm sure you can use other things as well.

    0 Not allowed! Not allowed!

Bookmarks

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
All times are GMT -10. The time now is 04:51 PM.
Powered by vBulletin®
Copyright © 2017 vBulletin Solutions, Inc. All rights reserved.