Page 2 of 2

Re: "kill monsters" x Friendly Monsters

PostPosted: Thu Jul 29, 2021 7:42 pm
by Logan MTM
SanyaWaffles wrote:Use Super.Damagemobj instead of Super::DamageMobj

Yes i did but i don't get how to apply this code in game.
Code: Select allExpand view
Class LOSII : Actor
{
Override int DamageMobj(Actor inflictor, Actor source, int damage, Name mod, int flags, double angle)
 {
 If(bFriendly)
  {
  Return 0;
  }
 Else
  {
  Return Super.DamageMobj(Inflictor, Source, Damage, Mod, Flags, Angle);
  }
 }
}

This is my actual attempt :|

Re: "kill monsters" x Friendly Monsters

PostPosted: Thu Jul 29, 2021 7:50 pm
by Blue Shadow
Logan MTM wrote:
cubebert wrote:I could be remembering wrong, but if you give your actor "DamageFactor "Massacre", 0.0", it should be impervious to the kill monsters command, as well as the mdk command.

Donesn't work! :(

In addition to the damage factor, you also need the LAXTELEFRAGDMG flag.

Code: Select allExpand view
actor blah : DoomImp
{
    DamageFactor "Massacre", 0
    
+LAXTELEFRAGDMG

Re: "kill monsters" x Friendly Monsters

PostPosted: Thu Jul 29, 2021 8:11 pm
by Logan MTM
There is! Tons of Friendly Actors say many thanks to you!
However, i still mad that i couldn't understand and make this zscript code work!

Re: "kill monsters" x Friendly Monsters

PostPosted: Thu Jul 29, 2021 11:07 pm
by SanyaWaffles
Next time show us the entire code and not just a snippet.

Re: "kill monsters" x Friendly Monsters

PostPosted: Fri Jul 30, 2021 3:50 am
by Logan MTM
That IS the entire code...