Jump to content
Search In
  • More options...
Find results that contain...
Find results in...
Sign in to follow this  
Starke Von Oben

HELP: My DECORATE monsters are killing eachother

Recommended Posts

I'm basing my enemies on Captain Toe Nail's Nazis, merely replacing the uniforms to Grey. I copied the code that I wanted (Machine Gun Guard, Rifle Guard & Pistol Guard) and pasted it into my decorate lump.

So far so good, and everything works fine. That is until I notice that they are able to kill eachother now, which they didn't previously in Toenail's mod. I can't see why this is happening, and I appear to have copied all the relevant information.

My code looks like this:

//German Soldiers
//Code by Captain Toenail

//Pistol Guard

actor PistolGuard 10600

{
obituary "%o was shot by a soldier."
health 50
radius 20
height 56
mass 100
speed 8
painchance 64
decal "bulletchip"
maxtargetrange 1024
damagefactor "nazi", 0
seesound "nazi/sight"
attacksound "nazi/pistol"
painsound "nazi/pain"
deathsound "nazi/death"
activesound "nazi/active"
MONSTER
+FLOORCLIP
states
{
Spawn:
WHPG A 10 A_Look
loop
See:
WHPG BBCCDDEE 3 A_Chase
loop
Missile:
WHPG LM 5 A_FaceTarget
FirePistol:
WHPG N 4 bright A_CustomBulletAttack (6, 6, 1, 1, "NaziPuff", 1024)
WHPG M 12 A_SentinelRefire
loop
Pain:
WHPG F 3
WHPG F 3 A_Pain
goto See
Death:
WHPG G 5
WHPG H 5 A_Scream
WHPG I 5 A_NoBlocking
WHPG J 5
WHPG K -1
stop
}
}

//Rifle Guard

actor RifleGuard 10601
{
obituary "%o was sniped by a soldier."
health 50
radius 20
height 56
mass 100
speed 8
painchance 64
decal "bulletchip"
damagefactor "nazi", 0
seesound "nazi/sight"
attacksound "nazi/rifle"
painsound "nazi/pain"
deathsound "nazi/death"
activesound "nazi/active"
MONSTER
+FLOORCLIP
+MISSILEMORE
states
{
Spawn:
WHRG A 10 A_Look
loop
See:
WHRG BBCCDDEE 3 A_Chase
loop
Missile:
WHRG LM 5 A_FaceTarget
FireRifle:
WHRG N 4 bright A_CustomBulletAttack (3, 3, 1, 10, "NaziPuff", 0)
WHRG M 36 A_SentinelRefire
loop
Pain:
WHRG F 3
WHRG F 3 A_Pain
goto See
Death:
WHRG G 5
WHRG H 5 A_Scream
WHRG I 5 A_NoBlocking
WHRG J 5
WHRG K -1
stop
}
}

//Machine Gun Guard

actor MGunGuard 10602
{
obituary "%o was gunned down by a soldier."
health 50
radius 20
height 56
mass 100
speed 8
painchance 64
decal "bulletchip"
damagefactor "nazi", 0
seesound "nazi/sight"
attacksound "nazi/machinegun"
painsound "nazi/pain"
deathsound "nazi/death"
activesound "nazi/active"
MONSTER
+FLOORCLIP
states
{
Spawn:
WHMG A 10 A_Look
loop
See:
WHMG BBCCDDEE 3 A_Chase
loop
Missile:
WHMG LM 5 A_FaceTarget
FireMgun:
WHMG N 2 bright A_CustomBulletAttack (8, 8, 1, 1, "NaziPuff")
WHMG M 2 A_CPosRefire
loop
Pain:
WHMG F 3
WHMG F 3 A_Pain
goto See
Death:
WHMG G 5
WHMG H 5 A_Scream
WHMG I 5 A_NoBlocking
WHMG J 5
WHMG K -1
stop
}
}


How can I stop these enemies from killing eachother?

Share this post


Link to post

Where's the code for the NaziPuff? What Toenail used was damagefactors. The enemies don't infight because they don't hurt each other. You can see this line on each monster:

damagefactor "nazi", 0
That means that the factor for damage of type "nazi" is 0, and you know that anything multiplied by 0 results in 0.

Damage type for hitscan attacks is determined by the puff. You can see in the A_CustomBulletAttack calls that they use NaziPuff. So you need to make sure that your puffs do have the DamageType property and that the type declared there is the same (case doesn't matter, but typos do).

Share this post


Link to post

I assume it's something to do with damagefactor "nazi", 0, but I'm not sure. It's quite frustrating since I can't see any differences between this and the original code. In the original code the bullets from the Nazis don't kill eachother, they only hit the player.

Aarrrrgh!!! >:(

Share this post


Link to post
Gez said:

Where's the code for the NaziPuff? What Toenail used was damagefactors. The enemies don't infight because they don't hurt each other. You can see this line on each monster:

damagefactor "nazi", 0
That means that the factor for damage of type "nazi" is 0, and you know that anything multiplied by 0 results in 0.

Damage type for hitscan attacks is determined by the puff. You can see in the A_CustomBulletAttack calls that they use NaziPuff. So you need to make sure that your puffs do have the DamageType property and that the type declared there is the same (case doesn't matter, but typos do).


Thanks again Gez, I was missing this:

actor NaziPuff : BulletPuff
{
attacksound "bullet/ricochet"
damagetype "nazi"
}


I'm getting there slowly. Decorate isn't as daunting as it first looked :P Sorry for all these newbie questions, but they really do help.

Share this post


Link to post

Please sign in to comment

You will be able to leave a comment after signing in



Sign In Now
Sign in to follow this  
×