Results 1 to 2 of 2
  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
    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

    Delete this It somehow double posted.

    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 06:51 AM.
Powered by vBulletin®
Copyright © 2017 vBulletin Solutions, Inc. All rights reserved.