Running a script on projectile's target

Archive of the old editing forum
Forum rules
Before asking on how to use a ZDoom feature, read the ZDoom wiki first. This forum is archived - please use this set of forums to ask new questions.
Locked
User avatar
Drakon
Posts: 15
Joined: Sat Jan 07, 2012 5:11 am
Location: Czech Republic

Running a script on projectile's target

Post by Drakon »

Hi, I have question about ACS. I have a projectile and I want it to run script with hitted actor as a activator. I tried some variants but nothing works so far. I tried bulletpuff but that don't work either. Anyone has some good idea how to do it? Thx
User avatar
Tapwave
Posts: 2096
Joined: Sat Aug 20, 2011 8:54 am
Preferred Pronouns: No Preference
Graphics Processor: nVidia with Vulkan support

Re: Running a script on projectile's target

Post by Tapwave »

Maybe some hacking around with GiveToTarget with an inventory item that activates a script?
User avatar
Drakon
Posts: 15
Joined: Sat Jan 07, 2012 5:11 am
Location: Czech Republic

Re: Running a script on projectile's target

Post by Drakon »

terranova wrote:Maybe some hacking around with GiveToTarget with an inventory item that activates a script?
Projectile's target is the shooter unfortunately. At least if I remember this correctly. But thx for the help anyway.
User avatar
Ravick
Posts: 2047
Joined: Sun Aug 22, 2010 10:59 pm
Location: Tubarão, Brasil
Contact:

Re: Running a script on projectile's target

Post by Ravick »

Cant it be a projectile with FORCEPAIN (or maybe its other name o.õ, cant look the wiki now), a custom damage and then a Pain.DAMAGE in the monsters of your wad? If you dont want the monsters to be in pain every time, just edit the pain state with no frames at all (time 0), just the commands.
User avatar
Tapwave
Posts: 2096
Joined: Sat Aug 20, 2011 8:54 am
Preferred Pronouns: No Preference
Graphics Processor: nVidia with Vulkan support

Re: Running a script on projectile's target

Post by Tapwave »

That would only work on monsters. If Drakon wants the activator to be any kind of actor, painstates isn't what you want.
User avatar
Drakon
Posts: 15
Joined: Sat Jan 07, 2012 5:11 am
Location: Czech Republic

Re: Running a script on projectile's target

Post by Drakon »

Ravick wrote:Cant it be a projectile with FORCEPAIN (or maybe its other name o.õ, cant look the wiki now), a custom damage and then a Pain.DAMAGE in the monsters of your wad? If you dont want the monsters to be in pain every time, just edit the pain state with no frames at all (time 0), just the commands.
I though about that but some of my monsters uses flag NOPAIN and I can't remove this flag without ruining them.
terranova wrote:That would only work on monsters. If Drakon wants the activator to be any kind of actor, painstates isn't what you want.
Sorry I didn't make it clear. I actually want it for monsters. I need it for poison based weapon so if enemy is hit by this projectile (or even bulletpuff) it will start script on such monster.
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: Running a script on projectile's target

Post by NeuralStunner »

Something that can't be done more simply with [wiki=Actor_properties#PoisonDamage]PoisonDamage[/wiki]?
User avatar
Drakon
Posts: 15
Joined: Sat Jan 07, 2012 5:11 am
Location: Czech Republic

Re: Running a script on projectile's target

Post by Drakon »

NeuralStunner wrote:Something that can't be done more simply with [wiki=Actor_properties#PoisonDamage]PoisonDamage[/wiki]?
Well I'm afraid that this will be the only solution. For regular poisons this shoul work fine. But I planned some special poisons that could slow down enemy or make them friendly for sime time... I guess I'll have to use this solution and use less complex poisons :).
Locked

Return to “Editing (Archive)”