Tracking when a player does damage

Discuss all aspects related to modding Zandronum here.
Post Reply
RobbyPants
 
Posts: 37
Joined: Wed Mar 13, 2013 12:53 am

Tracking when a player does damage

#1

Post by RobbyPants » Sat Apr 06, 2013 11:04 am

Is it possible to track when a player deals damage (either via hit scan weapon or projectile) in ACS? I wanted to make a script that would activate after the player successfully damages a monster.

Bonus points if it tracks when he damages a monster and not himself!

Lollipop
Zandrone
Posts: 1124
Joined: Tue Jul 24, 2012 10:34 am
Location: Denmark

RE: Tracking when a player does damage

#2

Post by Lollipop » Wed Apr 10, 2013 3:40 pm

Im not sure, but try and make a new puff for your weapons, which got their own damagetype, after that you make a new pain state in the monsters, that activates what you want.
Im not sure about the bonus thing, go get a pro for that one
Combinebobnt wrote:i can see the forum league is taking off much better than the ctf ones
GalactusToday at 1:07 PM
are you getting uncomfortable jap
feeling something happen down there

User avatar
Ivan
Addicted to Zandronum
Posts: 2229
Joined: Mon Jun 04, 2012 5:38 pm
Location: Omnipresent

RE: Tracking when a player does damage

#3

Post by Ivan » Wed Apr 10, 2013 4:07 pm

Pain.Damagetypenamehere is the answer.
=== RAGNAROK DM ON ... uh... dead forever? ===
=== ALWAYS BET ON ... uh... dead forever? ===
=== Who wanta sum wang? ===
=== Death and Decay - A new Monster/Weapon replacer ===

RobbyPants
 
Posts: 37
Joined: Wed Mar 13, 2013 12:53 am

RE: Tracking when a player does damage

#4

Post by RobbyPants » Tue May 07, 2013 12:44 pm

Ivan wrote: Pain.Damagetypenamehere is the answer.
(Sorry about the delayed reply)

So, the idea would be to give the player some unique damage types (both with melee attacks and their bullet puffs), and call the ACS in each monster's pain.type and death.type states? It's clunky, but it could work. I do have a question about explosions: how do I control these? I know I can give a rocket a custom damage type, but is there a way to tie it to explosions?

User avatar
Ivan
Addicted to Zandronum
Posts: 2229
Joined: Mon Jun 04, 2012 5:38 pm
Location: Omnipresent

RE: Tracking when a player does damage

#5

Post by Ivan » Tue May 07, 2013 12:47 pm

RobbyPants wrote:
Ivan wrote: Pain.Damagetypenamehere is the answer.
(Sorry about the delayed reply)

So, the idea would be to give the player some unique damage types (both with melee attacks and their bullet puffs), and call the ACS in each monster's pain.type and death.type states? It's clunky, but it could work. I do have a question about explosions: how do I control these? I know I can give a rocket a custom damage type, but is there a way to tie it to explosions?
The damagetype usually applies both to the direct damage of a projectile and the explosion spawned by it after. Pretty easy to use actually.
=== RAGNAROK DM ON ... uh... dead forever? ===
=== ALWAYS BET ON ... uh... dead forever? ===
=== Who wanta sum wang? ===
=== Death and Decay - A new Monster/Weapon replacer ===

Bloax
Forum Regular
Posts: 411
Joined: Mon Jun 04, 2012 5:11 pm

RE: Tracking when a player does damage

#6

Post by Bloax » Tue May 07, 2013 1:32 pm

Though if you really want to separate the two, just have the explosive thingy spawn a dummy actor that performs the actual explosion - with its own, separate damagetype.
[quote="Kennon Conrad"]Dear LawCounsels,
To prove your compressor works, I suggest you try it on your posts and then post only the result.

We all know an ideal lossy compressor would output 0 bytes for your posts, so see if you can beat that.

Have a nice day.[/quote]

Post Reply