Thread: Delaying gfx from happening

Results 1 to 8 of 8
  1. #1 Delaying gfx from happening 
    Registered Member
    Join Date
    Sep 2017
    Posts
    32
    Thanks given
    0
    Thanks received
    1
    Rep Power
    11
    Well ive been trying for the past view days to arrange my teleport anim/gfx, i found this statement if (System.CurrentMilliSeconds - c.something > 1500) but doesnt work for the gfx's, also tried the thread.sleep thing but it would stop all my teleport thing so not even animation nothing, just a pause in the program basically well so yeah if anyone got ideas, every lil bit of help is appreaciated

    (
    Reply With Quote  
     

  2. #2  
    Banned

    Join Date
    Oct 2012
    Posts
    4,710
    Thanks given
    1,679
    Thanks received
    1,105
    Rep Power
    0
    Code:
    player.playGraphics(new Graphic(-1));
    
    World.getWorld().schedule(new Task(1) {//1tick later
    			public void execute() {
    				//do new graphic, you can't play more graphics i believe even if you delay it you'll have to wait till the last one stopped
                                     stop();
    		});
    Reply With Quote  
     

  3. #3  
    Registered Member
    Join Date
    Dec 2017
    Posts
    31
    Thanks given
    12
    Thanks received
    4
    Rep Power
    23
    Usually a delay argument for gfx. Something like

    Code:
    player.playGraphics(new Graphic(-1, 50),);
    would delay the gfx.
    Reply With Quote  
     

  4. #4  
    Donator

    Join Date
    Jul 2013
    Posts
    488
    Thanks given
    21
    Thanks received
    42
    Rep Power
    0
    System.CurrentMilliSeconds isn't very accurate compared to the alternatives
    Reply With Quote  
     

  5. #5  
    Extreme Donator


    Join Date
    Oct 2010
    Posts
    2,853
    Thanks given
    1,213
    Thanks received
    1,622
    Rep Power
    5000
    The graphic update mask has support for delay, don't use a task or whatever..

    Code:
    builder.putShort(target.getGraphic().getId(), ByteOrder.LITTLE);
    builder.putInt(((target.getGraphic().getHeight().ordinal() * 50) << 16) + (target.getGraphic().getDelay() & 0xffff));
    Not sure what base you're using but in Elvarg you can simply do like this:

    Code:
    player.performGraphic(new Graphic(id, height, delay));
    Quote Originally Posted by Creampie47 View Post
    also tried the thread.sleep thing but it would stop all my teleport thing
    Thread.sleep() method can be used to pause the execution of current thread for specified time in milliseconds.
    You don't want to be suspending your game thread. It will prevent your server from updating which will lead to huge problems.
    Reply With Quote  
     

  6. Thankful user:


  7. #6  
    Registered Member
    Join Date
    Sep 2017
    Posts
    32
    Thanks given
    0
    Thanks received
    1
    Rep Power
    11
    well im using a task for now and it works i guess but wouldnt it be good tho? also im using PI base if u can tell me something it'd be appreciated
    Reply With Quote  
     

  8. #7  
    Banned

    Join Date
    Oct 2012
    Posts
    4,710
    Thanks given
    1,679
    Thanks received
    1,105
    Rep Power
    0
    Quote Originally Posted by Professor Oak View Post
    The graphic update mask has support for delay, don't use a task or whatever..

    Code:
    builder.putShort(target.getGraphic().getId(), ByteOrder.LITTLE);
    builder.putInt(((target.getGraphic().getHeight().ordinal() * 50) << 16) + (target.getGraphic().getDelay() & 0xffff));
    Not sure what base you're using but in Elvarg you can simply do like this:

    Code:
    player.performGraphic(new Graphic(id, height, delay));



    You don't want to be suspending your game thread. It will prevent your server from updating which will lead to huge problems.
    I think he means he want to display two gfx one delayed, which is infact not possible.
    If he just wants to display one and delay it, its possible using the mask yes if he does mean that i did not interpreter that correctly.
    Reply With Quote  
     

  9. #8  
    Registered Member
    Join Date
    Sep 2017
    Posts
    32
    Thanks given
    0
    Thanks received
    1
    Rep Power
    11
    i just want to delay it so it doesnt happen in the same as my animation
    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. Replies: 19
    Last Post: 08-19-2010, 05:02 AM
  2. Pulling/Ripping Gfx From 525+ Client
    By babykid13 in forum Requests
    Replies: 5
    Last Post: 11-22-2009, 04:47 AM
  3. Removing the gfx from logout 554 and other things.
    By sure im crazy in forum Snippets
    Replies: 1
    Last Post: 08-25-2009, 03:15 PM
  4. How to dump GFX from runescape?
    By Underoath in forum Requests
    Replies: 6
    Last Post: 08-25-2009, 11:49 AM
  5. Replies: 3
    Last Post: 06-03-2008, 07:21 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
  •