Thread: [PI] Object timer to spawn an object

Results 1 to 5 of 5
  1. #1 [PI] Object timer to spawn an object 
    Registered Member
    Join Date
    Jan 2011
    Posts
    30
    Thanks given
    0
    Thanks received
    0
    Rep Power
    1
    Hey everyone Im working on a nice little feature for my server which requires and object to spawn on a timer, iv come up with this code to do it but im not sure what file to add it into?

    Code:
    if (c.ObjectTimer = 120) {
    		c.getPA().checkObjectSpawn(2403, 2873, 10201, 1, 10);
    }
    		c.sendMessage("my message!!");
    break;
    I added it to objectmanager, Client.java, and clickobject.java and i get an error saying

    Cannot find symbol

    c.ObjectTimer
    ^

    If you can solve my problem i would highly appreciate it

    thanks
    Reply With Quote  
     

  2. #2  
    q.q


    Join Date
    Dec 2010
    Posts
    6,535
    Thanks given
    1,072
    Thanks received
    3,534
    Rep Power
    4752
    Where are you changing ObjectTimer to 120?
    Reply With Quote  
     

  3. #3  
    Registered Member
    Join Date
    Jan 2011
    Posts
    30
    Thanks given
    0
    Thanks received
    0
    Rep Power
    1
    Im not changing it any were? Im trying to add that code...
    Reply With Quote  
     

  4. #4  
    q.q


    Join Date
    Dec 2010
    Posts
    6,535
    Thanks given
    1,072
    Thanks received
    3,534
    Rep Power
    4752
    i see? why not just start an event when you need it?

    Code:
    EventManager.getSingleton().addEvent(new Event() {
    											public void execute(EventContainer b) {
    											c.getPA().checkObjectSpawn(2403, 2873, 10201, 1, 10);
    											c.sendMessage("Spawned object");
    											b.stop
    									}
    								}, 1000);
    It'd help if you included what your using it for.
    Reply With Quote  
     

  5. #5  
    Registered Member
    Join Date
    Jan 2011
    Posts
    30
    Thanks given
    0
    Thanks received
    0
    Rep Power
    1
    Im tyring to make a hide and seek system were an object spawns itself and send out a message to through the server saying hide and seek is a go, And i need the object to spawn on a timer to space out the event

    Will that code work for making it spawn every 4 hours and sending a message?
    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. 508 object spawn
    By Erand in forum Help
    Replies: 8
    Last Post: 05-30-2010, 11:01 PM
  2. Timer on object Rep++
    By massacre561 in forum Requests
    Replies: 1
    Last Post: 11-18-2009, 08:29 PM
  3. spawn object
    By xxlukexx in forum Help
    Replies: 5
    Last Post: 05-10-2009, 11:05 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
  •