Page 1 of 1

Running a script on projectile's target

Posted: Tue Jan 10, 2012 12:25 pm
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

Re: Running a script on projectile's target

Posted: Tue Jan 10, 2012 12:43 pm
by Tapwave
Maybe some hacking around with GiveToTarget with an inventory item that activates a script?

Re: Running a script on projectile's target

Posted: Tue Jan 10, 2012 1:06 pm
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.

Re: Running a script on projectile's target

Posted: Tue Jan 10, 2012 2:18 pm
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.

Re: Running a script on projectile's target

Posted: Tue Jan 10, 2012 2:23 pm
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.

Re: Running a script on projectile's target

Posted: Tue Jan 10, 2012 3:00 pm
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.

Re: Running a script on projectile's target

Posted: Tue Jan 10, 2012 5:43 pm
by NeuralStunner
Something that can't be done more simply with [wiki=Actor_properties#PoisonDamage]PoisonDamage[/wiki]?

Re: Running a script on projectile's target

Posted: Wed Jan 11, 2012 2:58 am
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 :).