Thread: Timers for Teleport

Results 1 to 9 of 9
  1. #1 Timers for Teleport 
    HTML5/CSS3/JQuery
    Griffon's Avatar
    Join Date
    Feb 2013
    Posts
    275
    Thanks given
    61
    Thanks received
    38
    Rep Power
    6
    Hey guys!

    I made a new teleport animation. Now, I wanna know how i can make the gfx happend like 2 seconds after the animation.

    THis is my animation



    I want it so the explosion GFX happens when he like jumps! I tried this
    Code:
    if (teleportType.equalsIgnoreCase("modern")) {
    				c.startAnimation(1914);
    				c.teleTimer = 10;
    				if(System.currentTimeMillis() - c.gfxDelay > 2000);
    					c.gfx100(287);
    				c.teleEndAnimation = 715;
    				c.gfxDelay = System.currentTimeMillis();
    			}
    But the gfx still happens right away...

    Plese help, rep++ and thanks

    [SPOIL]




    [/SPOIL]
    Reply With Quote  
     

  2. #2  


    RS Wiki's Avatar
    Join Date
    Mar 2011
    Age
    29
    Posts
    9,688
    Thanks given
    1,752
    Thanks received
    3,103
    Rep Power
    5000
    you could use the bone bury delay, that might work depending how long the teleport is
    All the best,
    Wiki




    coming soon
    Reply With Quote  
     

  3. #3  
    HTML5/CSS3/JQuery
    Griffon's Avatar
    Join Date
    Feb 2013
    Posts
    275
    Thanks given
    61
    Thanks received
    38
    Rep Power
    6
    Didnt work....

    [SPOIL]




    [/SPOIL]
    Reply With Quote  
     

  4. #4  
    Registered Member
    Nando's Avatar
    Join Date
    Feb 2009
    Age
    29
    Posts
    3,517
    Thanks given
    2,439
    Thanks received
    1,108
    Rep Power
    5000
    gotta use events/ticks w.e ur server uses


    Reply With Quote  
     

  5. #5  
    HTML5/CSS3/JQuery
    Griffon's Avatar
    Join Date
    Feb 2013
    Posts
    275
    Thanks given
    61
    Thanks received
    38
    Rep Power
    6
    Just need a little tut, thats it i dont need this really badly but it would be cool

    [SPOIL]




    [/SPOIL]
    Reply With Quote  
     

  6. #6  
    Registered Member

    Join Date
    Feb 2010
    Posts
    3,253
    Thanks given
    1,145
    Thanks received
    909
    Rep Power
    2081
    Quote Originally Posted by Griffon View Post
    Hey guys!

    I made a new teleport animation. Now, I wanna know how i can make the gfx happend like 2 seconds after the animation.

    THis is my animation



    I want it so the explosion GFX happens when he like jumps! I tried this
    Code:
    if (teleportType.equalsIgnoreCase("modern")) {
    				c.startAnimation(1914);
    				c.teleTimer = 10;
    				if(System.currentTimeMillis() - c.gfxDelay > 2000);
    					c.gfx100(287);
    				c.teleEndAnimation = 715;
    				c.gfxDelay = System.currentTimeMillis();
    			}
    But the gfx still happens right away...

    Plese help, rep++ and thanks
    Why does:
    Code:
    if(System.currentTimeMillis() - c.gfxDelay > 2000);
    have a
    Code:
    ;
    after it
    Reply With Quote  
     

  7. #7  
    HTML5/CSS3/JQuery
    Griffon's Avatar
    Join Date
    Feb 2013
    Posts
    275
    Thanks given
    61
    Thanks received
    38
    Rep Power
    6
    LOL just realized, i made it
    }

    but it still doesnt work.. Ill try and use the bone delay again

    EDIT: bury delay doesnt work either

    [SPOIL]




    [/SPOIL]
    Reply With Quote  
     

  8. #8  
    Owner of Dawntained

    Mgt Madness's Avatar
    Join Date
    Oct 2011
    Age
    28
    Posts
    3,380
    Thanks given
    1,429
    Thanks received
    958
    Rep Power
    2168
    Here's an example
    Code:
     public void dungemote()
        {
            EventManager.getSingleton().addEvent(new Event()
            {
                int dungtime = 16;
                public void execute(EventContainer dung)
                {
                    if (dungtime == 16)
                    {
                        gfx0(2442);
                        startAnimation(13190);
                    }
                    if (dungtime == 15)
                    {
                        npcId2 = 11228;
                        isNpc = true;
                        updateRequired = true;
                        appearanceUpdateRequired = true;
                        startAnimation(13192);
                    }
                    if (dungtime == 10)
                    {
                        npcId2 = 11227;
                        isNpc = true;
                        updateRequired = true;
                        appearanceUpdateRequired = true;
                        startAnimation(13193);
                    }
                    if (dungtime == 6)
                    {
                        gfx0(2442);
                    }
                    if (dungtime == 5)
                    {
                        npcId2 = 11229;
                        updateRequired = true;
                        appearanceUpdateRequired = true;
                        startAnimation(13194);
                    }
                    if (dungtime == 0)
                    {
                        npcId2 = -1;
                        updateRequired = true;
                        appearanceUpdateRequired = true;
                    }
                    if (dungtime <= 0)
                    {
                        dung.stop();
                        return;
                    }
                    if (dungtime >= 0)
                    {
                        dungtime--;
                    }
                }
            }, 600);
        }
    Reply With Quote  
     

  9. Thankful user:


  10. #9  
    HTML5/CSS3/JQuery
    Griffon's Avatar
    Join Date
    Feb 2013
    Posts
    275
    Thanks given
    61
    Thanks received
    38
    Rep Power
    6
    THANKS! It worked

    Made my own, declared it and it worked! THanks bud

    rep++ and thanked

    [SPOIL]




    [/SPOIL]
    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. Anyone know the GFX for Teleporting?
    By Shivers in forum Help
    Replies: 1
    Last Post: 03-20-2009, 07:45 PM
  2. Better way for Teleport Names
    By Roger in forum Tutorials
    Replies: 13
    Last Post: 11-14-2008, 08:30 PM
  3. Second thing for teleports?
    By Sherwood in forum Help
    Replies: 2
    Last Post: 11-11-2008, 08:50 AM
  4. Need a timer for mage against npc
    By bmxxscape in forum Help
    Replies: 0
    Last Post: 11-07-2008, 09:16 AM
  5. Need Timer For Gs's,D Scim And Whip
    By Ftw^ in forum Requests
    Replies: 2
    Last Post: 10-21-2008, 07:49 PM
Tags for this Thread

View Tag Cloud

Posting Permissions
  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •