Thread: [Whitescape] Looping animations

Results 1 to 5 of 5
  1. #1 [Whitescape] Looping animations 
    Community Veteran

    Llama's Avatar
    Join Date
    Oct 2006
    Age
    33
    Posts
    510
    Thanks given
    0
    Thanks received
    0
    Rep Power
    106
    My Update Block:
    Code:
    		if(!updateRequired && !chatTextUpdateRequired) return ;		// nothing required
    		int updateMask = 0;
    		if(chatTextUpdateRequired) updateMask |= 0x80;
    		if(faceNPCupdate) updateMask |= 1;
    		if(animationRequest != -1) updateMask |= 8;
    		if(appearanceUpdateRequired) updateMask |= 0x10;
    		if(hitUpdateRequired) updateMask |= 0x20;
    		if(dirUpdateRequired) updateMask |= 0x40;
                    if(animationRequest != -1) updateMask |= 8;
    
    		if(updateMask >= 0x100) {
    			// byte isn't sufficient
    			updateMask |= 0x40;			// indication for the client that updateMask is stored in a word
    			str.writeByte(updateMask & 0xFF);
    			str.writeByte(updateMask >> 8);
    		}
    		else str.writeByte(updateMask);
    
    		// now writing the various update blocks itself - note that their order crucial
                	if(animationRequest != -1) appendAnimationRequest(str);
    		if(chatTextUpdateRequired) appendPlayerChatText(str);
                	if(faceNPCupdate)   appendFaceNPCUpdate(str);
    		if(appearanceUpdateRequired) appendPlayerAppearance(str);
    		if(hitUpdateRequired) appendHitUpdate(str);
    		if(dirUpdateRequired) appendDirUpdate(str);
    Animation methods:
    Code:
    	public void startAnimation(int animIdx)
    
    	{
    
    		animationRequest = animIdx;
    
    		animationWaitCycles = 0;
    
    	}
    	public void appendAnimationRequest(stream str)
    
    	{
    
    		str.writeWordBigEndian((animationRequest==-1) ? 65535 : animationRequest);
    
    		str.writeByteC(animationWaitCycles);
    
    	}

    EXAMPLE:
    startAnimation(811);
    does a never ending loop of the animation #811

    Can anyone help? ):



    Reply With Quote  
     

  2. #2  
    Registered Member
    Sanity's Avatar
    Join Date
    Dec 2008
    Posts
    2,062
    Thanks given
    22
    Thanks received
    362
    Rep Power
    762
    Did you look into changing the values for animationWaitCycles, as 0 could indicated a never ending loop of the animation.
    Reply With Quote  
     

  3. #3  
    Community Veteran

    Llama's Avatar
    Join Date
    Oct 2006
    Age
    33
    Posts
    510
    Thanks given
    0
    Thanks received
    0
    Rep Power
    106
    I changed it to 1 and it had no effect. Also, i looked at project 16 v 6 and it has an identical method; however, it doesn't loop endlessly.



    Reply With Quote  
     

  4. #4  
    Community Veteran

    Llama's Avatar
    Join Date
    Oct 2006
    Age
    33
    Posts
    510
    Thanks given
    0
    Thanks received
    0
    Rep Power
    106
    fixed it... i wasn't even calling startAnimation, i was accidentally still calling the original setAnimation..
    which was set to just:
    Code:
    pEmote = animidx;
    updateRequired = true;
    animationUpdateRequired = true;



    Reply With Quote  
     

  5. #5  
    ⚓Manic-Owner⚓


    Join Date
    Nov 2007
    Posts
    2,711
    Thanks given
    47
    Thanks received
    9
    Rep Power
    650
    Look at pimpscape in player + client class and rip their method out, thats wut i did.
    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
  •