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

Thread: Event System

  1. #11
    Developer
    Join Date
    Jun 2010
    Location
    Hungary
    Posts
    291

    Default

    At first, thank you very much Razorapid! It's a great stuff!

    I have two reflections.

    I shot at myself with empty mg42 and it gave NIL value to the local.inflictor at 'damage' callback. Doesn't the inflictor the mg42 in this case? In addition, local.damage signs the value given in the .tik file. For instance, if dmbulletdamage is 45 then local.damage is always 45 - not as much as it takes away the player, because this value changes at certain vulnerability locations.

  2. #12
    Über Prodigy & Developer Razo[R]apiD's Avatar
    Join Date
    May 2010
    Location
    Poland, Lublin
    Posts
    3,257

    Default

    Hmm, actually it's not my fault. It's how engine works, I only copy values I get from
    Code:
    Entity::Damage
    function, and pass them to script. So if inflictor is NIL, then it should be NIL.

    And I think that damage should be the exact damage that is going to be taken. Didn't test it with mg42, but I think it should work fine and give exact amount of damage. However, I'll look into this next weekend.

  3. #13
    Developer
    Join Date
    Jun 2010
    Location
    Hungary
    Posts
    291

    Default

    Ok, thanks for the reply!

  4. #14
    Banned
    Join Date
    May 2010
    Location
    fuck off?
    Posts
    1,145

    Default

    local.inflictor is the weapon .

    usualy world, if u bash someone, it would be player, if u shoot, probably world or NIl unless that entity has a targetname.

    shoot yourself with a mg42 with a targetname...should probably print that name..

  5. #15

    Default

    You could get the model.tik, by doing local.inflictor.model

  6. #16
    Banned
    Join Date
    May 2010
    Location
    fuck off?
    Posts
    1,145

    Default

    or an easy check might be to check the classname.

    however, in most cases i would ignore inflictor and use other

  7. #17
    Developer
    Join Date
    Jun 2010
    Location
    Hungary
    Posts
    291

    Default

    i tried it and the local.target is "world" and the local.inflictor is NULL. i've added a "player_mg42" targetname.

    i need another solution.

  8. #18
    Banned
    Join Date
    May 2010
    Location
    fuck off?
    Posts
    1,145

    Default

    what are you trying to do?

  9. #19
    Developer
    Join Date
    Jun 2010
    Location
    Hungary
    Posts
    291

    Default

    i dont know yet. now i'm making the another parts of the mod.

  10. #20
    Developer
    Join Date
    Jun 2010
    Location
    Hungary
    Posts
    291

    Default

    perhaps i misunderstood your question. what will be my solution or what i want to make with this thing?

Posting Permissions

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