"kill monsters" x Friendly Monsters

Ask about ACS, DECORATE, ZScript, or any other scripting questions here!

Moderator: GZDoom Developers

Forum rules
Before asking on how to use a ZDoom feature, read the ZDoom wiki first. If you still don't understand how to use a feature, then ask here.

Re: "kill monsters" x Friendly Monsters

Postby Logan MTM » Thu Jul 29, 2021 7:42 pm

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 :|
User avatar
Logan MTM
I can see you...
 
Joined: 16 Jan 2006
Location: Rio de Janeiro - Brazil

Re: "kill monsters" x Friendly Monsters

Postby Blue Shadow » Thu Jul 29, 2021 7:50 pm

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
User avatar
Blue Shadow
 
Joined: 14 Nov 2010
Operating System: Windows 10/8.1/8/201x 64-bit
OS Test Version: No (Using Stable Public Version)
Graphics Processor: ATI/AMD (Modern GZDoom)

Re: "kill monsters" x Friendly Monsters

Postby Logan MTM » Thu Jul 29, 2021 8:11 pm

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!
User avatar
Logan MTM
I can see you...
 
Joined: 16 Jan 2006
Location: Rio de Janeiro - Brazil

Re: "kill monsters" x Friendly Monsters

Postby SanyaWaffles » Thu Jul 29, 2021 11:07 pm

Next time show us the entire code and not just a snippet.
User avatar
SanyaWaffles
Never trust floor sandwiches
 
Joined: 25 Apr 2013
Location: Eastern Ohio
Discord: SanyaWaffles#5095
Twitch ID: sanyawaffles
Operating System: Windows 10/8.1/8/201x 64-bit
OS Test Version: No (Using Stable Public Version)
Graphics Processor: nVidia with Vulkan support

Re: "kill monsters" x Friendly Monsters

Postby Logan MTM » Fri Jul 30, 2021 3:50 am

That IS the entire code...
User avatar
Logan MTM
I can see you...
 
Joined: 16 Jan 2006
Location: Rio de Janeiro - Brazil

Previous

Return to Scripting

Who is online

Users browsing this forum: No registered users and 0 guests