Thread: Graphics are appearing after interfaces are shown

Results 1 to 3 of 3
  1. #1 Graphics are appearing after interfaces are shown 
    Registered Member

    Join Date
    Feb 2009
    Age
    24
    Posts
    2,851
    Thanks given
    90
    Thanks received
    216
    Discord
    View profile
    Rep Power
    675
    Here's my code:
    Code:
    			if(buttonId == 0) {
    				player.graphics(6);
    				player.getActionSender().displayInterface(115);
    				try {
    					Thread.sleep(3000);
    				} catch (InterruptedException e) {
    					// TODO Auto-generated catch block
    					e.printStackTrace();
    				}
    				player.getActionSender().displayInterface(170);
    			}
    But it fades the screen out (Interface 115 fades it out) and then fades it back in (Interface 170 fades it back in) and THEN shows the gfx, when the gfx should be shown first. What do I need to do?
    Reply With Quote  
     

  2. #2  
    Registered Member
    Hotyute's Avatar
    Join Date
    Jan 2008
    Posts
    2,016
    Thanks given
    7
    Thanks received
    92
    Rep Power
    1482
    why do u sleep your Thread? do you know that all execution will temporarily seize on that Thread if that piece of code is called? you should use an event or something. and the animation should come last.


    Reply With Quote  
     

  3. #3  
    Registered Member

    Join Date
    Feb 2009
    Age
    24
    Posts
    2,851
    Thanks given
    90
    Thanks received
    216
    Discord
    View profile
    Rep Power
    675
    Could you show me how I would use an event for this?
    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
  •