PDA

View Full Version : Problem with RadiusDamage ,does not show that I kill the enemy...



Moczulak
13th February 2013, 13:11
Why using radiusDamage does not show that I killed, a player?


radiusDamage(place, 220, 200, 20, player);

<origin> = place
<range> = 220
<max damage> = 200
<min damage> = 20
[attacker] = player

player = players[i]

Jeplaa
13th February 2013, 13:47
RadiusDamage: Does damage to all damageable objects within a given radius. The amount of damage is linear according to how close the object is to the radius.
~zeroy.com/script (http://www.zeroy.com/script/)

For damage "player-player" use: self FinishPlayerDamage( eInflictor, eAttacker, iDamage, iDFlags, sMeansOfDeath, sWeapon, vPoint, vDir, sHitLoc, psOffsetTime );
P.S. You can find it in gametype.gsc

Tally
13th February 2013, 14:00
Why using radiusDamage does not show that I killed, a player?


radiusDamage(place, 220, 200, 20, player);

<origin> = place
<range> = 220
<max damage> = 200
<min damage> = 20
[attacker] = player

player = players[i]

There is no argument for attacker/player. These are the only arguments radiusdamage() accepts:

From the Official COD2 Script Documentation (no need to link to Zeroy, who has plagiarized IW's documentation and passes it off as his own):


radiusdamage(<origin>, <range>, <max damage>, <min damage>)

IzNoGoD
13th February 2013, 15:15
What happens when you call radiusdamage ON a player? Wouldnt it make that player the attacker/inflicter?

Tally
13th February 2013, 18:10
What happens when you call radiusdamage ON a player? Wouldnt it make that player the attacker/inflicter?

Well, unless you can carry the player argument through the function, it wouldn't mean jack shit, would it? And in the case of radiusdamage() there is no such argument parameter, so the game engine would never know who the attacker/inflicter is.

In a multiplayer environment, it is always better to use finishPlayerDamage() if you are wanting to register damage on a player. Obviously because this function has an inflicter parameter. However, it is limited in that it can 1) only be used in MP, and does not work in SP; and 2) it does not do damage on world entities - only players. If you want to destroy a S&D objective for example, it is useless. In that case, it is better to use radiusdamage().