Thread: [Emulous] Why wont this delete object code work?!?!

Page 3 of 3 FirstFirst 123
Results 21 to 30 of 30
  1. #21  
    Registered Member
    Join Date
    Aug 2008
    Posts
    918
    Thanks given
    1
    Thanks received
    12
    Rep Power
    34
    well... check if its in there.. loadobjects()
    Reply With Quote  
     

  2. #22  
    Registered Member
    Join Date
    Aug 2008
    Posts
    918
    Thanks given
    1
    Thanks received
    12
    Rep Power
    34
    try this....
    client.java
    Code:
    	public void RemoveObject(int objectX, int objectY) { 
    		ReplaceObject2(objectX, objectY, 6951, -1, 10);
    	}
    and stick this shit in process()... yes i know its bad...
    Code:
    		RemoveObject(XXXX, XXXX);
    and remove loadobjects() out of initialize()
    Reply With Quote  
     

  3. #23  
    Previously Hyperion


    Join Date
    Jan 2009
    Posts
    1,254
    Thanks given
    3
    Thanks received
    18
    Rep Power
    138
    ignore what xy19 said it will re-remove objects ever 500ms, not only is it stupid, but will probably be glitchy. Make sure the method in initialize is the correct one. My way should work...let me reread over some of your code.

    Search for removeobject2, it might be counting the coffin as scenery.

    [Only registered and activated users can see links. ]
    Reply With Quote  
     

  4. #24  
    Registered Member The Turk's Avatar
    Join Date
    Nov 2009
    Posts
    295
    Thanks given
    0
    Thanks received
    0
    Rep Power
    50
    there is no removeobject2
    what code would you like to read?
    Reply With Quote  
     

  5. #25  
    Registered Member
    Join Date
    Aug 2008
    Posts
    918
    Thanks given
    1
    Thanks received
    12
    Rep Power
    34
    Quote Originally Posted by Mental Piracy View Post
    ignore what xy19 said it will re-remove objects ever 500ms, not only is it stupid, but will probably be glitchy. Make sure the method in initialize is the correct one. My way should work...let me reread over some of your code.

    Search for removeobject2, it might be counting the coffin as scenery.
    well it works lol..


    replace object2
    Code:
    	public void ReplaceObject2(int objectX, int objectY, int NewObjectID, int Face, int ObjectType)
    	{
    		outStream.createFrame(85);
    		outStream.writeByteC(objectY - (mapRegionY * 8));
    		outStream.writeByteC(objectX - (mapRegionX * 8));
    
    		outStream.createFrame(101);
    		outStream.writeByteC((ObjectType << 2) + (Face & 3));
    		outStream.writeByte(0);
    
    		if (NewObjectID != -1) {
    			outStream.createFrame(151);
    			outStream.writeByteS(0);
    			outStream.writeWordBigEndian(NewObjectID);
    			outStream.writeByteS((ObjectType << 2) + (Face & 3));
    		}
    	}
    Reply With Quote  
     

  6. #26  
    Registered Member The Turk's Avatar
    Join Date
    Nov 2009
    Posts
    295
    Thanks given
    0
    Thanks received
    0
    Rep Power
    50
    i still need hep!
    Reply With Quote  
     

  7. #27  
    Registered Member
    Join Date
    Aug 2008
    Posts
    918
    Thanks given
    1
    Thanks received
    12
    Rep Power
    34
    what the hell is wrong? try what i said and see if it works.
    Reply With Quote  
     

  8. #28  
    Registered Member The Turk's Avatar
    Join Date
    Nov 2009
    Posts
    295
    Thanks given
    0
    Thanks received
    0
    Rep Power
    50
    didnt
    Reply With Quote  
     

  9. #29  
    Registered Member
    Join Date
    Aug 2008
    Posts
    918
    Thanks given
    1
    Thanks received
    12
    Rep Power
    34
    Code:
    	public void ReplaceObject2(int objectX, int objectY, int NewObjectID, int Face, int ObjectType)
    	{
    		outStream.createFrame(85);
    		outStream.writeByteC(objectY - (mapRegionY * 8));
    		outStream.writeByteC(objectX - (mapRegionX * 8));
    
    		outStream.createFrame(101);
    		outStream.writeByteC((ObjectType << 2) + (Face & 3));
    		outStream.writeByte(0);
    
    		if (NewObjectID != -1) {
    			outStream.createFrame(151);
    			outStream.writeByteS(0);
    			outStream.writeWordBigEndian(NewObjectID);
    			outStream.writeByteS((ObjectType << 2) + (Face & 3));
    		}
    	}
    
    	public void RemoveObject(int objectX, int objectY) { 
    		ReplaceObject2(objectX, objectY, 6951, -1, 10);
    	}
    ^ insert that into client.java

    insert this into client.java
    Code:
    	public void DeleteObjects() { 
    		RemoveObject(XXXX, XXXX);
    		RemoveObject(XXX, XXXX);
    	}
    remember to replace the XXXXXXXX's


    now in public void initialize()
    add...
    Code:
    DeleteObjects();
    if that dosnt work try adding DeleteObjects(); to process().
    Reply With Quote  
     

  10. #30  
    Registered Member The Turk's Avatar
    Join Date
    Nov 2009
    Posts
    295
    Thanks given
    0
    Thanks received
    0
    Rep Power
    50
    :/ damn this is annoying me been at it 2 days now
    Reply With Quote  
     

Page 3 of 3 FirstFirst 123

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
  •