No announcement yet.

Modifying a damage type

  • Filter
  • Time
  • Show
Clear All
new posts

    Modifying a damage type

    In my current map I have serveral areas where people are periodically killed by a triggered physics zone (dont worry, they do have a 3 second warning before a zone is depressurised!). It all works fine, but a game can take a long time to finish as being depressurised is counted as a suicide.

    I wish to alter the depressurised damage type (ie create a new one) that does not count as a suicide, so the player does not lose one frag every time they are depressurised.

    if someone could tell me how to do this I would be very grateful. Please be aware that I have almost no knowlegde of UScript and have never done scripting in my life. I do wish to learn and this provides a good opportunity.

    Kills are usually attributed to "the one that set the event in motion", called the Instigator in code. If you push someone, you're the instigator. So if that results in them falling to their deaths (the engine determines you're the cause if it happens in three seconds or so), you get the kill.

    If you somehow set the Instigator to whoever caused the depressurization you could give them the point for the kill. But maybe that already happens, and is the way the engine knows it's a suicide: the one that died is the one that caused it, and the engine deducts a point instead.

    You're probably going to have to mess with the code that hands out the suicide penalty. Can't help you there, I fear.

    If you don't know coding at all, this might be a bit of a problem.


      Thats a bit of a bummer really.

      Ah well...


        i didnt actually test this so im not sure if it will work
        subclass the damage type you want, add this function, and cross your fingers
        static function ScoreKill(Controller Killer, Controller Killed)
         //check is it a suicide
         if( Killer == Killed)
         //if its not a suicide count the kill
         super.ScoreKill(Killer, Killed);
        the wiki should show you how to add code to your maps myLevel from inside unrealed. it seems to be down at the moment