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.
|
|

Here's my code:
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?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); }
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.

Could you show me how I would use an event for this?
| « staff of lightning stats | Cant run 562... Weird run error » |
| Thread Information |
Users Browsing this ThreadThere are currently 1 users browsing this thread. (0 members and 1 guests) |