Flag for solid actor that CAN NOT be shoot

Moderator: GZDoom Developers

Post Reply
User avatar
Apeirogon
Posts: 1605
Joined: Mon Jun 12, 2017 12:57 am

Flag for solid actor that CAN NOT be shoot

Post by Apeirogon »

Coding monster with custom hitbox area, like arachnotron that can be injured only with shoot aimed directly into brain, I face two problem.

1.I need to remove +SHOOTABLE flag from monster, that attack can pass through him to some hitbox inside radius/height monster property.
But A_KillMaster and A_DamageMaster, which activate on the death of hitbox actor to kill "master" monster, dont work on "master" without +SHOOTABLE flag.
A_RemoveMaster lead to script error, like dont arising platform/step to exit pillar in 07 map of Doom 2.

2. Projectile which hit +SOLID monster enter death state, even if it mark as -SHOOTABLE.
Even +RIPPER projectile enter to death state without ripping to aimed hitbox area.
Hitscan attack work as expected, "fly" through monster without any changes and problems.

So I need flag that left actor with blocking and collide check properties of +SOLID flag, but dont block flying through it projectile and hitscan.
Currently most suitable flag that show what i wish is SPECTRAL, actor left in area of interest of game physics and do not react to any attack and disturb them.
But it say "A monster with this flag can only be hurt by a missile that also has this flag set.", so it can lead to some...."thing", like "I kill mighty spider mastermind shooting only at it left heel".
Name it like SOLIDCANTSHOOT.
User avatar
Graf Zahl
Lead GZDoom+Raze Developer
Lead GZDoom+Raze Developer
Posts: 49056
Joined: Sat Jul 19, 2003 10:19 am
Location: Germany

Re: Flag for solid actor that CAN NOT be shoot

Post by Graf Zahl »

You can do that easily by using ZScript and overriding the CanCollideWith method for your monster.
User avatar
Apeirogon
Posts: 1605
Joined: Mon Jun 12, 2017 12:57 am

Re: Flag for solid actor that CAN NOT be shoot

Post by Apeirogon »

If I know how to use it...
Well, i get it. Try to find some who teach me what, how and why to do this.
User avatar
Graf Zahl
Lead GZDoom+Raze Developer
Lead GZDoom+Raze Developer
Posts: 49056
Joined: Sat Jul 19, 2003 10:19 am
Location: Germany

Re: Flag for solid actor that CAN NOT be shoot

Post by Graf Zahl »

That's what the "editing" forum is there for.
ZzZombo
Posts: 315
Joined: Mon Jul 16, 2012 2:02 am

Re: Flag for solid actor that CAN NOT be shoot

Post by ZzZombo »

Remove the +SHOOTABLE, add +VULNERABLE.
User avatar
Apeirogon
Posts: 1605
Joined: Mon Jun 12, 2017 12:57 am

Re: Flag for solid actor that CAN NOT be shoot

Post by Apeirogon »

ZzZombo wrote:Remove the +SHOOTABLE, add +VULNERABLE.
:wub: :thumb: :glomp:
Dude you awesome, lets drink :cheers:
Post Reply

Return to “Closed Feature Suggestions [GZDoom]”