Having a projectile execute a script upon an actor it hits

Discuss anything ZDoom-related that doesn't fall into one of the other categories.
Post Reply
User avatar
Kinsie
Posts: 7402
Joined: Fri Oct 22, 2004 9:22 am
Graphics Processor: nVidia with Vulkan support
Location: MAP33
Contact:

Having a projectile execute a script upon an actor it hits

Post by Kinsie »

Hello! I'm making a weapon for DUMP3. DUMP3 doesn't allow the changing of enemies to do DamageType fun stuff. So I want to have an actor hit by this new weapon's projectile to execute a script that does the things I want it to do (checks properties like actor height, changes actor flags to make it frightened if small enough etc.). I asked TerminusEst13 about this, and he went into a spiel about seeker projectiles and custom inventory powerup doohickeys, but I'll be honest - it was in voice chat so absolutely none of it stuck in my mind and/or clipboard. Does anyone have any idea how I'd do this?
User avatar
ChronoSeth
Posts: 1631
Joined: Mon Jul 05, 2010 2:04 pm
Location: British Columbia

Re: Having a projectile execute a script upon an actor it hi

Post by ChronoSeth »

I managed to get this working. It does abuse A_SeekerMissile, but no custominventory shenanigans are needed.

Decorate:
Spoiler:
ACS:
Spoiler:
User avatar
Kinsie
Posts: 7402
Joined: Fri Oct 22, 2004 9:22 am
Graphics Processor: nVidia with Vulkan support
Location: MAP33
Contact:

Re: Having a projectile execute a script upon an actor it hi

Post by Kinsie »

Thanks, but I managed to figure this out. I ended up using A_RadiusGive, which was a lot simpler. :)
User avatar
jpalomo
Posts: 772
Joined: Mon May 17, 2010 9:45 am

Re: Having a projectile execute a script upon an actor it hi

Post by jpalomo »

In ChronoSeth's example, you can use +HitTracer on the FearBall instead of +SeekerMissile and A_SeekerMissile. You can then put the ACS call in a XDeath state to avoid calling it whenever the projectile hits terrain.
User avatar
ChronoSeth
Posts: 1631
Joined: Mon Jul 05, 2010 2:04 pm
Location: British Columbia

Re: Having a projectile execute a script upon an actor it hi

Post by ChronoSeth »

Kinsie wrote:A_RadiusGive
I was going to suggest that, but it has one problem:
The Wiki wrote:Note that the receiving actor's center point must be within the radius specified by the distance parameter, otherwise it won't receive the item.
I suppose that might not matter depending on how you set it up, though.
jpalomo wrote:In ChronoSeth's example, you can use +HitTracer on the FearBall instead of +SeekerMissile and A_SeekerMissile.
Ah, I didn't know about that flag. That's definitely a better way of doing things.
User avatar
The Zombie Killer
Posts: 1528
Joined: Thu Jul 14, 2011 12:06 am
Location: Gold Coast, Queensland, Australia

Re: Having a projectile execute a script upon an actor it hi

Post by The Zombie Killer »

I was going to suggest HITTRACER when this thread was first posted, but then noticed that the purpose of the question was for DUMP3, which requires Zandronum 3.0 support. Unfortunately, Zandronum 3.0 does not have support for any of the HIT* flags, as far as I know.
User avatar
Leonard2
Posts: 313
Joined: Tue Aug 14, 2012 6:10 pm

Re: Having a projectile execute a script upon an actor it hi

Post by Leonard2 »

The Zombie Killer wrote:Unfortunately, Zandronum 3.0 does not have support for any of the HIT* flags, as far as I know.
Not yet.
User avatar
NeuralStunner
 
 
Posts: 12328
Joined: Tue Jul 21, 2009 12:04 pm
Preferred Pronouns: No Preference
Operating System Version (Optional): Windows 11
Graphics Processor: nVidia with Vulkan support
Location: capital N, capital S, no space
Contact:

Re: Having a projectile execute a script upon an actor it hi

Post by NeuralStunner »

The Zombie Killer wrote:I was going to suggest HITTRACER when this thread was first posted, but then noticed that the purpose of the question was for DUMP3, which requires Zandronum 3.0 support. Unfortunately, Zandronum 3.0 does not have support for any of the HIT* flags, as far as I know.
Indeed, I had to set aside a weapon idea for the same reason. (Though in my case I could probably get away with using ye olde A_Explode hackke.)
Post Reply

Return to “General”