A_SkullAttack not dealing damage

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.

Please bear in mind that the people helping you do not automatically know how much you know. You may be asked to upload your project file to look at. Don't be afraid to ask questions about what things mean, but also please be patient with the people trying to help you. (And helpers, please be patient with the person you're trying to help!)
Post Reply
User avatar
Ravick
Posts: 2003
Joined: Sun Aug 22, 2010 10:59 pm
Location: Tubarão, Brasil
Contact:

A_SkullAttack not dealing damage

Post by Ravick »

Hi there.

I was toying around with DECORATE, and I've noticed that two of my monsters were not making any damage with A_SkullAttack. Here go their attack frames:

Code: Select all

Charge:
    TNT1 A 0 ThrustThingZ (0, 10, 0, 1)
	RABB C 8 A_FaceTarget
	RABB D 4 A_SkullAttack
	//
	TNT1 AAAAAAAAAA 0 A_SpawnItemEx ("PurpleLight", 0, 0, random (3, 5), random (-5, 5), random (-5, 5), random (1, 2), 0, 0, 0)
	RABB D 5 A_Jump ("See", 20)
	Goto Charge+3
And:

Code: Select all

  Missile4:
    SPRI D 10 A_FaceTarget
	SPRI E 5 A_SkullAttack
	SPRI EE 4
	//SPRI D 0 A_JumpIfTargetInLOS ("Missile4", 270, JLOSF_CLOSENOFOV | JLOSF_DEADNOJUMP, 0, 0)
	TNT1 A 0 A_MonsterRefire (127, "See") 
    goto Missile4+1
(The //commented line is an old attempt to make it seek its target while charging.)


What am I making wrong?

Thanks in advanced!
User avatar
Apeirogon
Posts: 1605
Joined: Mon Jun 12, 2017 12:57 am

Re: A_SkullAttack not dealing damage

Post by Apeirogon »

Did you define damage property on actor which must call skull attack function? Because it uses it to determine damage, IIRC.
User avatar
Graf Zahl
Lead GZDoom+Raze Developer
Lead GZDoom+Raze Developer
Posts: 49066
Joined: Sat Jul 19, 2003 10:19 am
Location: Germany

Re: A_SkullAttack not dealing damage

Post by Graf Zahl »

Posting code fragments won't get you much help. I also suspect a missing damage property, but without the entire code that's merely a guess.
User avatar
Ravick
Posts: 2003
Joined: Sun Aug 22, 2010 10:59 pm
Location: Tubarão, Brasil
Contact:

Re: A_SkullAttack not dealing damage

Post by Ravick »

Ok... feeling dumb now... '-'

I've just realized that all the times I've toyed around with A_SkullAttack, I had used inheritance from monsters that alread had "damage" property (just like the Lost Souls), and thus I've always belived that the function itself had a default damage value.

Thanks for answering, guys.
Post Reply

Return to “Scripting”