My monster is dropping too many of the same item.

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.

My monster is dropping too many of the same item.

Postby Hidden Hands » Fri Jun 14, 2019 4:27 pm

My monster, when killed, is supposed to drop a decorative item (it can't be picked up, it's just for show). However, when they are killed, they seem to drop two or more of it. Not just the one. Here is my code:

Code: Select allExpand view
ACTOR FloatingClown : Cacodemon replaces Cacodemon
{
  Health 400
  Radius 31
  Height 56
  Mass 400
  Speed 8
  PainChance 128
  BloodColor Pink
  DropItem "GoldenLamp"
  Monster
  +FLOATBOB
  +NOGRAVITY
  +DONTHARMCLASS
  SeeSound "FloatClown/Sight"
  PainSound "FloatClown/Pain"
  DeathSound "FloatClown/Death"
  ActiveSound "FloatClown/Active"
  Obituary "%0 was cursed by a floating clown."
  HitObituary "%0 was hexed by a floating clown."
  States
  {
  Spawn:
    LAMP ABCB 10 A_Look
    Loop
  See:
    LAMP ABCB 8 A_Chase
    Loop
  Missile:
    LAMP EF 5 A_FaceTarget
    LAMP G 5 Bright A_HeadAttack
    Goto See
  Pain:
    LAMP D 3
    LAMP D 3 A_Pain
    LAMP D 6
    Goto See
  Death:
    LAMP D 6
    LAMP H 6 A_Scream
    LAMP IJ 6
    LAMP KL 6 A_NoBlocking
   LAMP M -1 A_SetFloorClip
    Stop
  Raise:
    LAMP M 8 A_UnSetFloorClip
    LAMP LKJIHD 8
    Goto See
  }
}


Why is it dropping more than one?

Thanks in advance.
User avatar
Hidden Hands
Deadite
 
Joined: 20 Sep 2016
Location: London, England

Re: My monster is dropping too many of the same item.

Postby Blue Shadow » Fri Jun 14, 2019 4:29 pm

You're calling A_NoBlocking twice, that's why.
User avatar
Blue Shadow
 
 
 
Joined: 14 Nov 2010
Operating System: Windows 10/8.1/8 64-bit
Graphics Processor: ATI/AMD (Modern GZDoom)

Re: My monster is dropping too many of the same item.

Postby Hidden Hands » Fri Jun 14, 2019 4:34 pm

Blue Shadow wrote:You're calling A_NoBlocking twice, that's why.

Well how about that... thank you so much. Dunno how I missed that! THANKS!
User avatar
Hidden Hands
Deadite
 
Joined: 20 Sep 2016
Location: London, England


Return to Scripting

Who is online

Users browsing this forum: m8f and 0 guests