Page 2 of 3 FirstFirst 123 LastLast
Results 11 to 20 of 21

Thread: Player Collision CoD UO

  1. #11
    Brigadier General
    Join Date
    Oct 2012
    Posts
    994
    Thanks
    20
    Thanked 588 Times in 388 Posts
    Quote Originally Posted by fabio View Post
    To Solution 2:
    Is the callback_playerdamage() even called when the bots are stuck in each other?
    Well, using the codecallbacks to place your timer probably isn't the best idea. Put it in a gametype file, at the callback_playerdamage() method.

    But, to answer your question: yes: it is called, but no damage is returned because the victim is undefined. To actual produce any damage, the victim and damage amount has to be passed to the finishPlayerDamage() function. If either the victim or damage amount (iDamage) is undefined, no effect is produced. And that is precisely what is happening here - both bots are receiving damage and the code can't work out which one is the victim, so it returns 0 damage to them. Creating the timer will solve that problem.

    This solution is one that Perry Heart aka PEZZALUCIFER of Pezbot fame came up with. You might want to check out his code for it.

  2. The Following User Says Thank You to Tally For This Useful Post:

    kung foo man (29th October 2014)

  3. #12
    Private
    Join Date
    Oct 2014
    Posts
    32
    Thanks
    0
    Thanked 5 Times in 4 Posts
    Where can I find his code? I have absolutely no clue...
    The callback_playerdamage() is called on the victim isnt it? So if no victim is defined, how can the thread be called?

  4. #13
    Brigadier General
    Join Date
    Oct 2012
    Posts
    994
    Thanks
    20
    Thanked 588 Times in 388 Posts
    Quote Originally Posted by fabio View Post
    Where can I find his code? I have absolutely no clue...
    The callback_playerdamage() is called on the victim isnt it? So if no victim is defined, how can the thread be called?
    No, the damage from eInflictor/eAttacker is passed to the callback_playerdamage() method. From there, it picks up who should receive it. It is here that the code is failing.

    And, you can google for Pezbot source code.

    I am very sceptical about your assertion that you "have no clue". I am just waiting for the "can you do this for me?" request.

  5. #14
    Private
    Join Date
    Oct 2014
    Posts
    32
    Thanks
    0
    Thanked 5 Times in 4 Posts
    The one who recieves it is "self".
    I can't see anything special in the code of Pezbot.

    I downloaded different versions of pezbot but callback_playerdamage() doesn't show up anything special.
    (or I just don't see it......)

  6. #15
    Private
    Join Date
    Oct 2014
    Posts
    32
    Thanks
    0
    Thanked 5 Times in 4 Posts
    callback_playerdamage() is not being called when Bots are stuck in each other...
    I just tested it

  7. #16
    Assadministrator IzNoGoD's Avatar
    Join Date
    Aug 2012
    Posts
    1,718
    Thanks
    17
    Thanked 1,068 Times in 674 Posts
    So, the victim variable is undefined while self is defined? Should be easy to fix then, as self is the one getting the damage. Just check distances to other bots and set a flag on them to not recieve damage from the same player in the same frame again.

    Only difficulty would be the amount of damage...
    "Does not work" is an error report for a bug between keyboard and chair.

    All hail Artie Effem

  8. #17
    Private
    Join Date
    Oct 2014
    Posts
    32
    Thanks
    0
    Thanked 5 Times in 4 Posts
    The callback isn't even called..

  9. #18
    Brigadier General
    Join Date
    Oct 2012
    Posts
    994
    Thanks
    20
    Thanked 588 Times in 388 Posts
    Quote Originally Posted by fabio View Post
    The callback isn't even called..
    How do you know that? What checks have you tried?

  10. #19
    Private
    Join Date
    Oct 2014
    Posts
    32
    Thanks
    0
    Thanked 5 Times in 4 Posts
    I added some iprintln and logprint
    No result

  11. #20
    Brigadier General
    Join Date
    Oct 2012
    Posts
    994
    Thanks
    20
    Thanked 588 Times in 388 Posts
    Quote Originally Posted by fabio View Post
    I added some iprintln and logprint
    No result
    Then you have an unsolvable problem. Tough luck dude!

Posting Permissions

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