Thread: making GFX loop

Results 1 to 4 of 4
  1. #1 making GFX loop 
    Registered Member
    Join Date
    Dec 2007
    Posts
    120
    Thanks given
    0
    Thanks received
    3
    Rep Power
    44
    I was wondering how to make a GFX loop.. like repeat.
    Reply With Quote  
     

  2. #2  
    Registered Member

    Join Date
    Feb 2009
    Age
    27
    Posts
    2,861
    Thanks given
    127
    Thanks received
    226
    Rep Power
    700
    Code:
    if (command.equalsIgnoreCase("commandnamehere")) {
    
    	for (int i = 0; i < 5; i++) {
    		stillgfx(gfxid, locationX, locationY);
    	}
    }
    The < 5 is the loop times, change to < 10 to make it loop 10 times, etc.
    Reply With Quote  
     

  3. #3  
    Registered Member
    Join Date
    Dec 2007
    Posts
    120
    Thanks given
    0
    Thanks received
    3
    Rep Power
    44
    Quote Originally Posted by jameskmonger View Post
    Code:
    if (command.equalsIgnoreCase("commandnamehere")) {
    
    	for (int i = 0; i < 5; i++) {
    		stillgfx(gfxid, locationX, locationY);
    	}
    }
    The < 5 is the loop times, change to < 10 to make it loop 10 times, etc.
    I already knew that. I mean how do I make it go unlimited?
    Reply With Quote  
     

  4. #4  
    Donator

    tj007razor's Avatar
    Join Date
    Feb 2007
    Posts
    895
    Thanks given
    2
    Thanks received
    9
    Rep Power
    210
    Declare:
    Code:
    private boolean gfxOn = false;
    Add command:
    Code:
    if (command.matches("gfxswitch"))
    {
         gfxOn = !gfxOn; // if on, turn off - if off, turn on
    }
    Add to process:
    Code:
         if (gfxOn)
         {
              stillgfx(ID, X, Y);
         }
    Reply With Quote  
     


Thread Information
Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)


User Tag List

Posting Permissions
  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •