ItsMods

Full Version: draw damage
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
Pages: 1 2
is any way to make it? i mean when u shot somebody the game draws the damage near crosshair (i saw it in cod4Big Grin)
It's already shown. Isn't it?
By the way, it's called hitmark.
(06-20-2014, 19:39)SailorMoon Wrote: [ -> ]It's already shown. Isn't it?
By the way, it's called hitmark.

He means on the actual damage (by numbers) that the weapon does on each hit, like it shows in MMORPG-s.
u dont know what do i mean. i mean like i hit you with an ak and it does 57 damage this number pops up near the crosshair

(06-20-2014, 19:45)RaZ Wrote: [ -> ]
(06-20-2014, 19:39)SailorMoon Wrote: [ -> ]It's already shown. Isn't it?
By the way, it's called hitmark.

He means on the actual damage (by numbers) that the weapon does on each hit, like it shows in MMORPG-s.

yea you are right
Oh sorry, there's file in maps/mp/gametypes/ called "_damagefeedback.gsc". Copy the hitmark HUD Code, modify the position, and setvalue "player.sdmg". After go to _damage.gsc, find "onPlayerDamaged", and do this "attacker.sdmg+=iDamage;", so and reset it when player killed or stopped shooting.

Maybe someone have code for this..
(06-20-2014, 22:33)SailorMoon Wrote: [ -> ]Oh sorry, there's file in maps/mp/gametypes/ called "_damagefeedback.gsc". Copy the hitmark HUD Code, modify the position, and setvalue "player.sdmg". After go to _damage.gsc, find "onPlayerDamaged", and do this "attacker.sdmg+=iDamage;", so and reset it when player killed or stopped shooting.

Maybe someone have code for this..

there isnt any onPlayerDamage in _damage.gsc can u explain me in mode detail? i am not the biggest modder here;D
In _damage.gsc search for this thread: Callback_PlayerDamage_internal( eInflictor, eAttacker, victim, iDamage, iDFlags, sMeansOfDeath, sWeapon, vPoint, vDir, sHitLoc, psOffsetTime )

On some place inside there add some code that draws the text with the damage.

Code:
eAttacker thread YOURTEXT(iDamage);

This could be an example of the code, you have to modify it a lot, this thing probably bugs hard:

Code:
YOURTEXT( value )
{
    self.roundimage = self createFontString( "default", 1.7, self );
    self.roundimage setPoint( "", "", 0, 0 );
    self.roundimage setValue( value );
    self.roundimage.color = ( 1, 1, 1 );
    self.roundimage.sort = 15;
    self.roundimage.alpha = 1;
    self.roundimage.foreground = true;
    self.roundimage.glowcolor = ( 0, 1, 0 );
    self.roundimage.glowalpha = 1;
    self.roundimage setParent( level.uiParent );
    self.roundimage.hideWhenInMenu = false;
    self.roundimage.archived = false;
    wait 0.5;
    self.roundimage destroy();
}
(06-21-2014, 11:39)Yamato Wrote: [ -> ]In _damage.gsc search for this thread: Callback_PlayerDamage_internal( eInflictor, eAttacker, victim, iDamage, iDFlags, sMeansOfDeath, sWeapon, vPoint, vDir, sHitLoc, psOffsetTime )

On some place inside there add some code that draws the text with the damage.

Code:
eAttacker thread YOURTEXT(iDamage);

This could be an example of the code, you have to modify it a lot, this thing probably bugs hard:

Code:
YOURTEXT( value )
{
    self.roundimage = self createFontString( "default", 1.7, self );
    self.roundimage setPoint( "", "", 0, 0 );
    self.roundimage setValue( value );
    self.roundimage.color = ( 1, 1, 1 );
    self.roundimage.sort = 15;
    self.roundimage.alpha = 1;
    self.roundimage.foreground = true;
    self.roundimage.glowcolor = ( 0, 1, 0 );
    self.roundimage.glowalpha = 1;
    self.roundimage setParent( level.uiParent );
    self.roundimage.hideWhenInMenu = false;
    self.roundimage.archived = false;
    wait 0.5;
    self.roundimage destroy();
}
working wellFuck yea! except that is stucks on the screen if you hit someone faster than it destroys and if i set the wait to low number nobody could see them..
and it still stucks after death tooAngry
(06-21-2014, 12:03)26hz Wrote: [ -> ]
(06-21-2014, 11:39)Yamato Wrote: [ -> ]In _damage.gsc search for this thread: Callback_PlayerDamage_internal( eInflictor, eAttacker, victim, iDamage, iDFlags, sMeansOfDeath, sWeapon, vPoint, vDir, sHitLoc, psOffsetTime )

On some place inside there add some code that draws the text with the damage.

Code:
eAttacker thread YOURTEXT(iDamage);

This could be an example of the code, you have to modify it a lot, this thing probably bugs hard:

Code:
YOURTEXT( value )
{
    self.roundimage = self createFontString( "default", 1.7, self );
    self.roundimage setPoint( "", "", 0, 0 );
    self.roundimage setValue( value );
    self.roundimage.color = ( 1, 1, 1 );
    self.roundimage.sort = 15;
    self.roundimage.alpha = 1;
    self.roundimage.foreground = true;
    self.roundimage.glowcolor = ( 0, 1, 0 );
    self.roundimage.glowalpha = 1;
    self.roundimage setParent( level.uiParent );
    self.roundimage.hideWhenInMenu = false;
    self.roundimage.archived = false;
    wait 0.5;
    self.roundimage destroy();
}
working wellFuck yea! except that is stucks on the screen if you hit someone faster than it destroys and if i set the wait to low number nobody could see them..
and it still stucks after death tooAngry

Yes, I knew it bugged, I wrote that code as an example of how you could do it. It just needs a lot of work over it Smile Its not hard to do
(06-21-2014, 16:52)Yamato Wrote: [ -> ]
(06-21-2014, 12:03)26hz Wrote: [ -> ]
(06-21-2014, 11:39)Yamato Wrote: [ -> ]In _damage.gsc search for this thread: Callback_PlayerDamage_internal( eInflictor, eAttacker, victim, iDamage, iDFlags, sMeansOfDeath, sWeapon, vPoint, vDir, sHitLoc, psOffsetTime )

On some place inside there add some code that draws the text with the damage.

Code:
eAttacker thread YOURTEXT(iDamage);

This could be an example of the code, you have to modify it a lot, this thing probably bugs hard:

Code:
YOURTEXT( value )
{
    self.roundimage = self createFontString( "default", 1.7, self );
    self.roundimage setPoint( "", "", 0, 0 );
    self.roundimage setValue( value );
    self.roundimage.color = ( 1, 1, 1 );
    self.roundimage.sort = 15;
    self.roundimage.alpha = 1;
    self.roundimage.foreground = true;
    self.roundimage.glowcolor = ( 0, 1, 0 );
    self.roundimage.glowalpha = 1;
    self.roundimage setParent( level.uiParent );
    self.roundimage.hideWhenInMenu = false;
    self.roundimage.archived = false;
    wait 0.5;
    self.roundimage destroy();
}
working wellFuck yea! except that is stucks on the screen if you hit someone faster than it destroys and if i set the wait to low number nobody could see them..
and it still stucks after death tooAngry

Yes, I knew it bugged, I wrote that code as an example of how you could do it. It just needs a lot of work over it Smile Its not hard to do
yea thanksBig GrinHeart
Pages: 1 2