Posts: 25
Threads: 5
Joined: Sep 2012
Reputation:
0
is any way to make it? i mean when u shot somebody the game draws the damage near crosshair (i saw it in cod4 )
Posts: 3,704
Threads: 147
Joined: Jan 2011
Reputation:
119
06-20-2014, 19:39
(This post was last modified: 06-20-2014, 19:40 by Nekochan.)
It's already shown. Isn't it?
By the way, it's called hitmark.
C++/Obj-Cdeveloper. Neko engine wip
Steam: Click
Posts: 592
Threads: 67
Joined: Apr 2012
Reputation:
17
(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.
Posts: 25
Threads: 5
Joined: Sep 2012
Reputation:
0
06-20-2014, 19:45
(This post was last modified: 06-20-2014, 19:53 by 26hz.)
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
Posts: 3,704
Threads: 147
Joined: Jan 2011
Reputation:
119
06-20-2014, 22:33
(This post was last modified: 06-20-2014, 22:34 by Nekochan.)
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
Posts: 25
Threads: 5
Joined: Sep 2012
Reputation:
0
(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
Posts: 3,535
Threads: 420
Joined: Dec 2010
Reputation:
106
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();
}
Posts: 25
Threads: 5
Joined: Sep 2012
Reputation:
0
(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 well 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 too
Posts: 3,535
Threads: 420
Joined: Dec 2010
Reputation:
106
(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 well 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 too
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 Its not hard to do
Posts: 25
Threads: 5
Joined: Sep 2012
Reputation:
0
(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 well 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 too
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 Its not hard to do yea thanks
|