Thread: PI Looping Animations on Skilling :(

Results 1 to 2 of 2
  1. #1 PI Looping Animations on Skilling :( 
    Registered Member
    Join Date
    May 2010
    Posts
    152
    Thanks given
    7
    Thanks received
    3
    Rep Power
    12
    Hey everyone, this got asked a lot but no one help us
    So can some one please give us a little tutorial on how to add it

    Like how do we loop the animation? How to tell it when to start and when to stop?
    Can you put some sample code and teach us the basic?
    That would help a lot!! Please help me and other newbie out there!


    -Booo Yaaaaaa-
    Reply With Quote  
     

  2. #2  
    Banned

    Join Date
    Mar 2011
    Posts
    4,064
    Thanks given
    194
    Thanks received
    689
    Rep Power
    0
    You would use an event, dunno what event system you have, but I'll post an event manager one since it's the only one i remember by memory:

    Code:
    	private static void chopTree(final Client c, final int objectX, final int objectY) {
    		EventManager.getSingleton().addEvent(new Event() {
    			public void execute(EventContainer ec) {
    				if (c.getItems().freeSlots() <= 0) //if player has no available slots stop the event.
    					ec.stop();//stops the event.
    				else
    					c.startAnimation(1000); //if player has enough inventory space do stuff every 1800 ms (3 ticks) here, in this case an anim.
    			}
    		}, 1800); //time in milliseconds, 600 ms = 1 tick, 1800 = 3 tick, etc.
    	}
    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

Similar Threads

  1. [RSPS] Global Skilling or Skilling Zone?
    By Ambient in forum Voting
    Replies: 4
    Last Post: 10-21-2011, 08:32 PM
  2. players skilling then moving and still skilling
    By OodlesOfNoodles in forum Help
    Replies: 6
    Last Post: 08-25-2011, 10:30 PM
  3. [Whitescape] Looping animations
    By Llama in forum Help
    Replies: 4
    Last Post: 10-23-2009, 01:51 AM
  4. Looping
    By Echo` in forum Help
    Replies: 1
    Last Post: 10-06-2009, 07:16 AM
  5. Looping with while!
    By DJ Dan in forum Website Development
    Replies: 1
    Last Post: 07-07-2008, 03:42 PM
Posting Permissions
  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •