Jump to content
Search In
  • More options...
Find results that contain...
Find results in...
  • 0
Socram43240

Ways to imitate A_SkullAttack???

Question

I'm having a trouble with the command A_SkullAttack, because i'm trying to create a custom LostSoul where he somehow could make a DamageType "Infect", but the problem is that A_SkullAttack only has the option to customize it's speed, any ideas of trying to copy it with commands sush as A_JumpIfCloser, A_CustomMissile (If it get close enough to the target) or a A_CustomMeleeAtack.

Share this post


Link to post

1 answer to this question

Recommended Posts

  • 0

You can find the ZScript source of basically every action function related to a predefined actor in *zdoom.pk3, right in the /zscript directory. You can also refer to the same folder at GZDoom's GitHub, which is guaranteed to always be up-to-date.

 

That said, the damage type dealt by the default +SKULLFLY collision ( as that's what's responsible for letting the lost soul act like a missile and deal damage upon collision ) is hardcoded to the "Melee" damage type, but you can bypass this by setting the actor's Damage property to 0, then overriding the Slam() virtual function for that actor and shoving your own DamageMobj() into it with the proper damage type set. Just don't forget to call Super.Slam() afterwards, though, or else your actor will probably get stuck in the charging state.

Share this post


Link to post

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×