Thread: PI jad help

Results 1 to 3 of 3
  1. #1 PI jad help 
    Registered Member
    Join Date
    Sep 2011
    Posts
    68
    Thanks given
    4
    Thanks received
    6
    Rep Power
    14
    Hey does any one know how to make it so that jad spawns on a timer? I currently have it so when you click on the cave it teleports you in and straight to jad, meaning, jad spawns straight away and starts attacking you, BUT what I want to do is make it so you have to wait 10 seconds before he spawns so that way people can prepare for battle, if anyone knows how to add a timer to it, please lemme know thanks
    Reply With Quote  
     

  2. #2  
    Donator

    Arithium's Avatar
    Join Date
    May 2010
    Age
    31
    Posts
    4,721
    Thanks given
    199
    Thanks received
    1,256
    Rep Power
    1114
    Code:
    public void spawnJad() {
         EventManager.getSingleton().addEvent(new Event() {
              public void execute(EventContainer e) {
                   Server.fightCaves.spawnNextWave((Client) PlayerHandler.players[playerId]);
                   e.stop();
              }
        }, 10000);
    }
    in player.java, in playerassistant.java in the method enterCave add c.spawnJad();
    Reply With Quote  
     

  3. Thankful user:


  4. #3  
    Registered Member
    Join Date
    Sep 2011
    Posts
    68
    Thanks given
    4
    Thanks received
    6
    Rep Power
    14
    Thanks alot, I think the problem was the server.fightcaves.spawnNextwave, Since i had that in the entercave method he would just spawn, so i deleted that and added the c,spawnjad();

    thanks alot
    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
  •