alright well im having an issue in trying to make skill reduce damage, i got these skills all set up but i have no idea in where to put it, i tried putting it in the wardens defence skill part but it doesnt seem to be working
geesu i found a way to make a damage reduce u can use hamsandwich to do this function... also mabye u can use this for the night elf evasion if the traceline isnt working correctly... never happened to me but i think ive heard some complaints on the forums where people said there screen went blue and it said they evaded a shot but really didnt, i made a new topic about it but mabye using this way would be better for making sure it doesnt do any damage at all
RegisterHam(Ham_TakeDamage, "player", "EVENT_TakeDamage");
public EVENT_TakeDamage( iVictim, inflictor , iAttacker, Float:iDamage, damagetype )
{
//Inflictor is the entity that caused the damage (such as a gun).
// all ur if statements in here..... here are a couple of examples
if ( !WC3_Check() )
{
return HAM_IGNORED
}
// Make sure we have a valid victim
if ( SHARED_ValidPlayer( iVictim ) && p_data_b[iVictim][PB_ISCONNECTED] )
{
// We need to have a valid player!
if ( SHARED_ValidPlayer( iAttacker ) )
{
new iSkillLevel;
// Check to see if this user has night elf's evasion
if ( SM_GetSkillLevel( iVictim, SKILL_MANASHIELD ) > 0 )
{
iSkillLevel = SM_GetSkillLevel( iVictim, SKILL_MANASHIELD );
if (iSkillLevel > 0 && !p_data_b[iVictim][PB_HEXED])
{
new iHealth, Take,total;
iHealth = get_user_health(iVictim);
Take = floatround(iDamage * (1-p_manashield[iSkillLevel-1]));
total = iHealth-Take;
if(total <= 0)
WC3_Kill( iVictim, iAttacker, inflictor, 0 );
else
set_user_health(iVictim, total);
return HAM_SUPERCEDE
}
}
}
}
return HAM_IGNORED
}
does RegisterHam allow you to hook EVENT_TakeDamage BEFORE the damage is actually dealt? If so i'm changing this ASAP - I always HATED how i had to hack around it....
wish i wasn't on a mac right now (first time ever) so i could do some CS dev
Yea was tinkering w/it today while waiting for wow to update...
CZ bots were giving me trouble but got osme help on IRC - no ETA on release for this but i'm going to use it Once i can figure out how to determine what wpn did the damage hmmmm
i know this is off topic but by any chance if i make max_skills higher and add a new skill to every race, do i need to do anything special for cham other than change the for loops in the cham race skill section and add another g_chamskills in the skill manager?
Are you entirely sure? I thought that to at first but don't believe it's correct. If you get the classname of that ID (via pev) then it replies with "player". Also - sometimes the ID is too high to be a weapon ID. The weird part is - with grenades - it returns the class name of "grenade"
Can you shed some light? I've been away from this too long lol
not sure if it uses a name or weapon id number like 43 for a colt or something thats why theres one for number and one for weapon name depends how it says it itself %d uses number %s uses name.... i would test it out but im having issues with my cham skills