Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
draw damage
#1
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)
Reply

#2
It's already shown. Isn't it?
By the way, it's called hitmark.
C++/Obj-Cdeveloper. Neko engine wip
Steam: Click
Reply

#3
(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.
Reply

#4
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
Reply

#5
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..
C++/Obj-Cdeveloper. Neko engine wip
Steam: Click
Reply

#6
(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
Reply

#7
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();
}
Reply

#8
(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
Reply

#9
(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
Reply

#10
(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
Reply



Possibly Related Threads…
Thread Author Replies Views Last Post
  Changing hitbox's position / model damage? Cation 21 12,700 09-12-2014, 16:24
Last Post: Cation
Question Help How to draw a line in cod6 map xinghun 7 4,486 08-20-2014, 16:06
Last Post: xinghun

Forum Jump:


Users browsing this thread:
1 Guest(s)

Forum Powered By MyBB, Theme by © 2002-2024 Melroy van den Berg.