1. Hey Guest, is it this your first time on the forums?

    Visit the Beginner's Box

    Introduce yourself, read some of the ins and outs of the community, access to useful links and information.

    Dismiss Notice

OnHit

Discussion in 'Modding Help' started by LightTab2, Nov 23, 2014.

  1. LightTab2

    LightTab2 Drill Rusher
    1. Zen Laboratories

    Messages:
    83
    Can somebody tell me where is the file, which contains code that team members can't hit each other?

    Thanks in advance.
     
  2. Skinney

    Skinney THD Team THD Team Forum Moderator Tester

    Messages:
    468
    It's in a lot of the scripts, not just one in particular.

    eg: on line 764 of KnightLogic.as there is the following if statement.
    Code:
    if (b.getTeamNum() == this.getTeamNum() && !b.hasTag("dead"))
    If the above is true, continue. You can read about continue here, tl;dr skip to next iteration of the loop that the statement is nested in.
     
    NinjaCell, LightTab2 and Asu like this.
  3. LightTab2

    LightTab2 Drill Rusher
    1. Zen Laboratories

    Messages:
    83
    Thanks, all the time I was searching for OnHit fuction, didn't think it can be DoAttack.
    I want to remove/off/bypass
    that's the reason why I post this thread.

    It will be not a problem, I know the basics of C++ :wink:
    Thanks again.

    EDIT: The arrow is stuck in my mate's head, but he didn't take damage, why?

    EDIT2: You have to in gamemode.cfg turn on friendly damage ;)
     
    Last edited: Jan 11, 2015