Author Topic: Function called when a Player is damaged by another Player/AIPlayer  (Read 760 times)

Please tell me the function, and give me the arguments for it.

Also, it can't be ProjectileData::Damage because I don't think that works for raycast weapons

I don't know off the top of my head, but I do know that if you were PurpleMetro I would've spewed a 60pt "trace(1);"


that's all I have to offer, trace(1);

It is indeed armor::Damage

Arguments: armor::Damage(%this,%damagedPlayer,%projectile,%pos, %damageLevel, %a)

I don't know what the argument %a is, but I know that %projectile.player returns the player that fired it.

I would use player::damage(%this, %obj, %sourceObject, %position, %damage, %damageType) depending on the situation.
%obj is the player.
%sourceObject is the player who fired it.
%position is for where it hits (Always going to be body)
%damage is the damage they receive, which can easily be modified for damage reduction / critical hits,
%damageType fetches the damage type.
I'm positive this function also works with AIPlayers.
« Last Edit: November 09, 2012, 06:27:23 PM by Alphadin »

I would use player::damage(%this, %obj, %sourceObject, %position, %damage, %damageType) depending on the situation.
%obj is the player.
%sourceObject is the player who fired it.
%position is for where it hits (Always going to be body)
%damage is the damage they receive, which can easily be modified for damage reduction / critical hits,
%damageType fetches the damage type.
I'm positive this function also works with AIPlayers.
Just what I needed!

I would use player::damage(%this, %obj, %sourceObject, %position, %damage, %damageType) depending on the situation.
%obj is the player.
%sourceObject is the player who fired it.
%position is for where it hits (Always going to be body)
%damage is the damage they receive, which can easily be modified for damage reduction / critical hits,
%damageType fetches the damage type.
I'm positive this function also works with AIPlayers.
so %this and %obj is the victim?

so %this and %obj is the victim?
I do believe so. I know for a fact %obj is the victim, but not too sure on %this.