Jump to content

Adding headshots to monsters in GZDoom


Recommended Posts

So I am working on this Doom wad and I really wan't the chaingun and pistol to do 2x bonus damage to monster heads but I don't know how to program that into the game. Any help?

Share this post


Link to post

I think it might be a great deal of work. This thread might be of help, though.

 

 

This thread might also have some links which could help.

 

Share this post


Link to post

Thank you but how would i add them to my own monster i don't know anything about coding 

 

 

 

 

 

ACTOR MarPfhorFighter 999
{
    Obituary "%o caught a Pfhor Fighter's fastball."
    HitObituary "%o was smacked around by a Pfhor Fighter's staff."
    Health 70
    Radius 20
    Height 56
    Mass 60
    Speed 11
    PainChance 200
    Scale 0.4
    BloodColor "Yellow"
    SeeSound "fighter/see"
    PainSound "PFHORD1"
    DeathSound "fighter/death"
    ActiveSound "fighter/active"
    Monster
    +FLOORCLIP
    Translation "112:127=%[0,0,0]:[2.0,1.0,0.5]"
    States
    {
    Spawn:
        Q001 A 1 A_Look
        Loop
    See:
        Q001 BBCCDDEE 3 A_Chase
        Loop
    Melee:
        TNT1 A 0 A_PlaySound("fighter/swing")
        Q001 FG 8 Bright A_FaceTarget
        Q001 H 6 Bright A_CustomMeleeAttack(20+random(0,5),"fighter/staff")
        Goto See
    Missile:
        TNT1 A 0 A_PlaySound("fighter/swing")
        Q001 FG 8 Bright A_FaceTarget
        Q001 H 6 Bright A_CustomMissile("StaffShot",30,0,random(-2,2))
        Goto See
    Pain:
        Q001 I 2
        Q001 I 2 A_Pain
        Goto See
    Death:
        Q001 J 15 A_SpawnItemEx("ZombieAmmoDropper",0,0,0, 0,0,0, 0,SXF_NOCHECKPOSITION|SXF_TRANSFERPOINTERS)
        Q001 K 5 A_Scream
        Q001 L 5 A_NoBlocking
        Q001 A 0 A_PlaySound("BodyDrop")
    Death.Corpse:
        Q001 M -1
        Stop
    XDeath:
        Q001 N 15 A_SpawnItemEx("ZombieAmmoDropper",0,0,0, 0,0,0, 0,SXF_NOCHECKPOSITION|SXF_TRANSFERPOINTERS)
        Q001 M 0 A_SpawnItemEx("GibDropperMedium",0,0,28,0,0,0,0,SXF_NOCHECKPOSITION|SXF_USEBLOODCOLOR)
        Q001 O 5 A_PlaySound("GibDrop")
        Q001 P 5
        Q001 Q 5 A_NoBlocking
        Q001 R -1
        Stop
    Raise:
        TNT1 A 0 ACS_NamedExecuteAlways("QCDE_DamageTracker",0,1)
        Q001 MLKJ 4
        Goto See

    Ice:    //needs this state to drop the "zombieammodropper"
        "####" "#" 0 A_GiveInventory("ImDead",1)
        "####" "#" 0 A_SpawnItemEx("ZombieAmmoDropper",0,0,0, 0,0,0, 0,SXF_NOCHECKPOSITION|SXF_TRANSFERPOINTERS)
        "####" "#" 5 A_GenericFreezeDeath
        "####" "#" 1 A_FreezeDeathChunks
        Wait
    }
}

ACTOR StaffShot
{
    Radius 6
    Height 8
    Speed 12
    Damage 4
    Scale 0.35
    DeathSound "fighter/staff"
    Projectile
    +RANDOMIZE
    States
    {
    Spawn:
        A001 AB 4 Bright Light(GreenMediumPoint3)
        LOOP
    Death:
        A002 A 4 Bright Light(GreenMediumPoint2)
        A002 B 4 Bright Light(GreenMediumPoint3)
        A002 C 4 Bright Light(GreeSmallPoint1)
        A002 D 4 Bright Light(GreeSmallPoint2)
        A002 E 4 Bright Light(GreeSmallPoint3)
        STOP
    }
}


 

Edited by MoustacheManny

Share this post


Link to post

Look at how they are implemented in other modsand try to replicate this approach. When you don'tknow anything about coding, now isthe right time to start learning.

Share this post


Link to post

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...