Thread: Object help [PI]

Results 1 to 3 of 3
  1. #1 Object help [PI] 
    Banned

    Join Date
    Mar 2011
    Posts
    4,062
    Thanks given
    194
    Thanks received
    689
    Rep Power
    0
    anyone know how i would make an object use an animation?
    Reply With Quote  
     

  2. #2  
    Registered Member (x²)'s Avatar
    Join Date
    Aug 2011
    Posts
    59
    Thanks given
    1
    Thanks received
    4
    Rep Power
    11
    Code:
    	public void createPlayersObjectAnim(int X,int Y,int animationID, int tileObjectType, int orientation){
    		if(c == null){
    			return;
    		}
    		try{
    			c.outStream.createFrame(85);
    			c.outStream.writeByteC(Y - (c.mapRegionY * 8));
    			c.outStream.writeByteC(X - (c.mapRegionX * 8));
    			int x = 0;
    			int y = 0;
    			c.outStream.createFrame(160);
    			c.outStream.writeByteS(((x&7) << 4) + (y&7));//tiles away - could just send 0       
    			c.outStream.writeByteS((tileObjectType<<2) +(orientation&3));
    			c.outStream.writeWordA(animationID);// animation id
    		} catch(Exception e){
    			e.printStackTrace();
    		}
    	}
    
    	public void objectAnim(int X,int Y,int animationID, int tileObjectType, int orientation) {
    		for(int i = 0; i < Config.MAX_PLAYERS; i++) {
    			if(Server.playerHandler.players[i] != null) {
    				Client person = (Client)Server.playerHandler.players[i];
    				if(person != null) {
    					Client cc = (Client)person;
    					if(cc.distanceToPoint(X, Y) <= 25){	
    						createPlayersObjectAnim(X,Y,animationID,tileObjectType,orientation);	
    					}
    				}	
    			}
    		}
    	}
    I've never used it, so that's about all I can do :/
    Reply With Quote  
     

  3. Thankful user:


  4. #3  
    Banned

    Join Date
    Mar 2011
    Posts
    4,062
    Thanks given
    194
    Thanks received
    689
    Rep Power
    0
    thanks all i needed was the method
    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. Object Height on object() void
    By Aleksandr in forum Help
    Replies: 33
    Last Post: 12-02-2013, 05:00 AM
  2. [PI] Object Manager - Object Height
    By Aleksandr in forum Help
    Replies: 9
    Last Post: 09-06-2012, 02:56 AM
  3. [PI] Object timer to spawn an object
    By gunnar in forum Help
    Replies: 4
    Last Post: 07-15-2011, 11:53 AM
  4. Replies: 176
    Last Post: 06-02-2011, 02:41 AM
Posting Permissions
  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •