Jump to content

Forums Announcement

Read-Only Mode for Announcements & Changelogs

Dear Survivors, we'd like to inform you that this forum will transition to read-only mode. From now on, it will serve exclusively as a platform for official announcements and changelogs.

For all community discussions, debates, and engagement, we encourage you to join us on our social media platforms: Discord, Twitter/X, Facebook.

Thank you for being a valued part of our community. We look forward to connecting with you on our other channels!

Stay safe out there,
Your DayZ Team

steam-76561198036675139

Need help with overriding base class

Recommended Posts

Hello everyone. I'm writing a script that will increase the damage of certain ammunition to specific creatures.
Here's the method:
 

modded class ZmbM_NBC_Yellow : ZombieBase
{
    override void EEHitBy(TotalDamageResult damageResult, int damageType, EntityAI source, string component, string ammo, vector modelPos)
    {
        if (ammo == "Bullet_357" /*||  другие условия для разных типов патронов */)
        {
            float currentDamage  = damageResult.GetDamage(Health, "Health");
            float newDamage = currentDamage * 1.5;
            damageResult.SetDamage(damageType, "Health", newDamage);
        }

        super.EEHitBy(damageResult, damageType, source, component, ammo, modelPos);
    }
}

It throws an error:
Function 'EEHitBy' is marked as override, but there is no function with this name in the base class.
But it exists in the base class:  (P:\scripts\4_world\entities\creatures\infected\zombiebase.c)
 

override void EEHitBy(TotalDamageResult damageResult, int damageType, EntityAI source, int component, string dmgZone, string ammo, vector modelPos, float speedCoef)
	{
		super.EEHitBy(damageResult, damageType, source, component, dmgZone, ammo, modelPos, speedCoef);
		
		m_TransportHitRegistered = false;
		
		if ( !IsAlive() )
		{
			ZombieHitData data = new ZombieHitData;
			data.m_Component = component;
			data.m_DamageZone = dmgZone;
			data.m_AmmoType = ammo;
			EvaluateDeathAnimationEx(source, data, m_DeathType, m_DamageHitDirection);
		}
		else
		{
			int crawlTransitionType = -1;
			if ( EvaluateCrawlTransitionAnimation(source, dmgZone, ammo, crawlTransitionType) )
			{
				m_CrawlTransition = crawlTransitionType;
				return;
			}
			
			if ( EvaluateDamageHitAnimation(source, dmgZone, ammo, m_DamageHitHeavy, m_DamageHitType, m_DamageHitDirection) )
			{
				if ( dmgZone )
					m_ShockDamage = damageResult.GetDamage( dmgZone, "Shock" );
				m_DamageHitToProcess = true;
				return;
			}
		}		
	}


 

Share this post


Link to post
Share on other sites
11 hours ago, steam-76561198036675139 said:

Hello everyone. I'm writing a script that will increase the damage of certain ammunition to specific creatures.
Here's the method:
 


modded class ZmbM_NBC_Yellow : ZombieBase
{
    override void EEHitBy(TotalDamageResult damageResult, int damageType, EntityAI source, string component, string ammo, vector modelPos)
    {
        if (ammo == "Bullet_357" /*||  другие условия для разных типов патронов */)
        {
            float currentDamage  = damageResult.GetDamage(Health, "Health");
            float newDamage = currentDamage * 1.5;
            damageResult.SetDamage(damageType, "Health", newDamage);
        }

        super.EEHitBy(damageResult, damageType, source, component, ammo, modelPos);
    }
}

It throws an error:
Function 'EEHitBy' is marked as override, but there is no function with this name in the base class.
But it exists in the base class:  (P:\scripts\4_world\entities\creatures\infected\zombiebase.c)
 


override void EEHitBy(TotalDamageResult damageResult, int damageType, EntityAI source, int component, string dmgZone, string ammo, vector modelPos, float speedCoef)
	{
		super.EEHitBy(damageResult, damageType, source, component, dmgZone, ammo, modelPos, speedCoef);
		
		m_TransportHitRegistered = false;
		
		if ( !IsAlive() )
		{
			ZombieHitData data = new ZombieHitData;
			data.m_Component = component;
			data.m_DamageZone = dmgZone;
			data.m_AmmoType = ammo;
			EvaluateDeathAnimationEx(source, data, m_DeathType, m_DamageHitDirection);
		}
		else
		{
			int crawlTransitionType = -1;
			if ( EvaluateCrawlTransitionAnimation(source, dmgZone, ammo, crawlTransitionType) )
			{
				m_CrawlTransition = crawlTransitionType;
				return;
			}
			
			if ( EvaluateDamageHitAnimation(source, dmgZone, ammo, m_DamageHitHeavy, m_DamageHitType, m_DamageHitDirection) )
			{
				if ( dmgZone )
					m_ShockDamage = damageResult.GetDamage( dmgZone, "Shock" );
				m_DamageHitToProcess = true;
				return;
			}
		}		
	}


 

Because of string: /*||  другие условия для разных типов патронов */ I can suggest that you're Russian speaking. But I can't bet that's why I'll  to explain your mistake on both langs.
EN:
You have wrong signatures of your methods:

// Source: DayZ\dta\scripts\4_World\Entities\Creatures\Infected\ZombieBase.c
class ZombieBase extends DayZInfected
{
	override void EEHitBy(TotalDamageResult damageResult, int damageType, EntityAI source, int component, string dmgZone, string ammo, vector modelPos, float speedCoef)
	{
		super.EEHitBy(damageResult, damageType, source, component, dmgZone, ammo, modelPos, speedCoef);
	}
}

// Source: DayZ\dta\scripts\4_World\Entities\Creatures\Infected\ZombieMaleBase.c
/ /When you trying to override with another signature:
modded class ZmbM_NBC_Yellow : ZombieBase
{
    override void EEHitBy(TotalDamageResult damageResult, int damageType, EntityAI source, string component, string ammo, vector modelPos)
    {
	}
}
/* Let's compare both funstions:
	ZombieBase: 
		void EEHitBy(TotalDamageResult damageResult, int damageType, EntityAI source, int component, string dmgZone, string ammo, vector modelPos, float speedCoef)
	ZmbM_NBC_Yellow:
		void EEHitBy(TotalDamageResult damageResult, int damageType, EntityAI source, string component, string ammo, vector modelPos)
		
	The difference is 4th element inside the function: on ZombieBase it's INT component; on ZmbM_NBC_Yellow it's STRING component; so that's why it will not working.
	Then, you're trying to extend from ZombieBase but your method is not inside ZombieBase, that method is located inside DayZInfected class, that means that ZombieBase is only the wrapper for DayZInfected base class.
	And as you can understand from the problem you need to override not the ZmbM_NBC_Yellow, you need to override the DayZInfected.EEHitBy event!
	
	I suggest you to explore the EntityAI source -> that Item is item on model that got Hit, with it you can get RootPlayer (in ours case it's RootZombie body) and then call GetType(), for check the Classname of zombie and if it's ZmbM_NBC_Yellow -> do one case else ...
*/

RU:

У тебя проблема в подписи события, который ты вызываешь:
 

// Исходник: DayZ\dta\scripts\4_World\Entities\Creatures\Infected\ZombieBase.c
class ZombieBase extends DayZInfected
{
	override void EEHitBy(TotalDamageResult damageResult, int damageType, EntityAI source, int component, string dmgZone, string ammo, vector modelPos, float speedCoef)
	{
		super.EEHitBy(damageResult, damageType, source, component, dmgZone, ammo, modelPos, speedCoef);
	}
}

// Исходник: DayZ\dta\scripts\4_World\Entities\Creatures\Infected\ZombieMaleBase.c
// Когда как ты пытаешься перегрузить другую сигнатуру:
modded class ZmbM_NBC_Yellow : ZombieBase
{
    override void EEHitBy(TotalDamageResult damageResult, int damageType, EntityAI source, string component, string ammo, vector modelPos)
    {
	}
}
/* Сравним оба события:
	ZombieBase: 
		void EEHitBy(TotalDamageResult damageResult, int damageType, EntityAI source, int component, string dmgZone, string ammo, vector modelPos, float speedCoef)
	ZmbM_NBC_Yellow:
		void EEHitBy(TotalDamageResult damageResult, int damageType, EntityAI source, string component, string ammo, vector modelPos)
		
	Отличие в 4м аргументе при вызове события: на ZombieBase это INT(число) component, когда как в ZmbM_NBC_Yellow это STRING(строка) component, вот почему это не работает.
	Затем ты пытаешься происходить класс от ZombieBase, но твоё событие не принадлежит ZombieBase, это событие наслудуется из класса DayZInfected, что констатирует нам, что ZombieBase - этолько агрегатор (расширение) для DayZInfected-базового класса.
	Как можно понять проблему, тебе надо перегружать не класс ZmbM_NBC_Yellow, тебе надо перегружить DayZInfected.EEHitBy событие!
	
	Я советую обратить внимание на EntityAI source -> этот EntityAI - есть объект,который словил маслину на теле зомбя, с помощью этого ты можешь получить RootPlayer (в нашем случае это "RootZombie"-тело), после чего вызвать GetType(), для проверки класса RootPlayer и получения клааса объекта и если это mbM_NBC_Yellow -> делай обработку своего эвента, если нет - работай как с обычной химвойсковым зомби...
*/

 

  • Like 1

Share this post


Link to post
Share on other sites
On 2/19/2024 at 3:09 PM, Sid Debian said:

Because of string: /*||  другие условия для разных типов патронов */ I can suggest that you're Russian speaking. But I can't bet that's why I'll  to explain your mistake on both langs.
EN:
You have wrong signatures of your methods:

RU:

У тебя проблема в подписи события, который ты вызываешь:
 


// Исходник: DayZ\dta\scripts\4_World\Entities\Creatures\Infected\ZombieBase.c
class ZombieBase extends DayZInfected
{
	override void EEHitBy(TotalDamageResult damageResult, int damageType, EntityAI source, int component, string dmgZone, string ammo, vector modelPos, float speedCoef)
	{
		super.EEHitBy(damageResult, damageType, source, component, dmgZone, ammo, modelPos, speedCoef);
	}
}

// Исходник: DayZ\dta\scripts\4_World\Entities\Creatures\Infected\ZombieMaleBase.c
// Когда как ты пытаешься перегрузить другую сигнатуру:
modded class ZmbM_NBC_Yellow : ZombieBase
{
    override void EEHitBy(TotalDamageResult damageResult, int damageType, EntityAI source, string component, string ammo, vector modelPos)
    {
	}
}
/* Сравним оба события:
	ZombieBase: 
		void EEHitBy(TotalDamageResult damageResult, int damageType, EntityAI source, int component, string dmgZone, string ammo, vector modelPos, float speedCoef)
	ZmbM_NBC_Yellow:
		void EEHitBy(TotalDamageResult damageResult, int damageType, EntityAI source, string component, string ammo, vector modelPos)
		
	Отличие в 4м аргументе при вызове события: на ZombieBase это INT(число) component, когда как в ZmbM_NBC_Yellow это STRING(строка) component, вот почему это не работает.
	Затем ты пытаешься происходить класс от ZombieBase, но твоё событие не принадлежит ZombieBase, это событие наслудуется из класса DayZInfected, что констатирует нам, что ZombieBase - этолько агрегатор (расширение) для DayZInfected-базового класса.
	Как можно понять проблему, тебе надо перегружать не класс ZmbM_NBC_Yellow, тебе надо перегружить DayZInfected.EEHitBy событие!
	
	Я советую обратить внимание на EntityAI source -> этот EntityAI - есть объект,который словил маслину на теле зомбя, с помощью этого ты можешь получить RootPlayer (в нашем случае это "RootZombie"-тело), после чего вызвать GetType(), для проверки класса RootPlayer и получения клааса объекта и если это mbM_NBC_Yellow -> делай обработку своего эвента, если нет - работай как с обычной химвойсковым зомби...
*/

 

 

On 2/19/2024 at 3:09 PM, Sid Debian said:

Because of string: /*||  другие условия для разных типов патронов */ I can suggest that you're Russian speaking. But I can't bet that's why I'll  to explain your mistake on both langs.
EN:
You have wrong signatures of your methods:


// Source: DayZ\dta\scripts\4_World\Entities\Creatures\Infected\ZombieBase.c
class ZombieBase extends DayZInfected
{
	override void EEHitBy(TotalDamageResult damageResult, int damageType, EntityAI source, int component, string dmgZone, string ammo, vector modelPos, float speedCoef)
	{
		super.EEHitBy(damageResult, damageType, source, component, dmgZone, ammo, modelPos, speedCoef);
	}
}

// Source: DayZ\dta\scripts\4_World\Entities\Creatures\Infected\ZombieMaleBase.c
/ /When you trying to override with another signature:
modded class ZmbM_NBC_Yellow : ZombieBase
{
    override void EEHitBy(TotalDamageResult damageResult, int damageType, EntityAI source, string component, string ammo, vector modelPos)
    {
	}
}
/* Let's compare both funstions:
	ZombieBase: 
		void EEHitBy(TotalDamageResult damageResult, int damageType, EntityAI source, int component, string dmgZone, string ammo, vector modelPos, float speedCoef)
	ZmbM_NBC_Yellow:
		void EEHitBy(TotalDamageResult damageResult, int damageType, EntityAI source, string component, string ammo, vector modelPos)
		
	The difference is 4th element inside the function: on ZombieBase it's INT component; on ZmbM_NBC_Yellow it's STRING component; so that's why it will not working.
	Then, you're trying to extend from ZombieBase but your method is not inside ZombieBase, that method is located inside DayZInfected class, that means that ZombieBase is only the wrapper for DayZInfected base class.
	And as you can understand from the problem you need to override not the ZmbM_NBC_Yellow, you need to override the DayZInfected.EEHitBy event!
	
	I suggest you to explore the EntityAI source -> that Item is item on model that got Hit, with it you can get RootPlayer (in ours case it's RootZombie body) and then call GetType(), for check the Classname of zombie and if it's ZmbM_NBC_Yellow -> do one case else ...
*/

RU:

У тебя проблема в подписи события, который ты вызываешь:
 


// Исходник: DayZ\dta\scripts\4_World\Entities\Creatures\Infected\ZombieBase.c
class ZombieBase extends DayZInfected
{
	override void EEHitBy(TotalDamageResult damageResult, int damageType, EntityAI source, int component, string dmgZone, string ammo, vector modelPos, float speedCoef)
	{
		super.EEHitBy(damageResult, damageType, source, component, dmgZone, ammo, modelPos, speedCoef);
	}
}

// Исходник: DayZ\dta\scripts\4_World\Entities\Creatures\Infected\ZombieMaleBase.c
// Когда как ты пытаешься перегрузить другую сигнатуру:
modded class ZmbM_NBC_Yellow : ZombieBase
{
    override void EEHitBy(TotalDamageResult damageResult, int damageType, EntityAI source, string component, string ammo, vector modelPos)
    {
	}
}
/* Сравним оба события:
	ZombieBase: 
		void EEHitBy(TotalDamageResult damageResult, int damageType, EntityAI source, int component, string dmgZone, string ammo, vector modelPos, float speedCoef)
	ZmbM_NBC_Yellow:
		void EEHitBy(TotalDamageResult damageResult, int damageType, EntityAI source, string component, string ammo, vector modelPos)
		
	Отличие в 4м аргументе при вызове события: на ZombieBase это INT(число) component, когда как в ZmbM_NBC_Yellow это STRING(строка) component, вот почему это не работает.
	Затем ты пытаешься происходить класс от ZombieBase, но твоё событие не принадлежит ZombieBase, это событие наслудуется из класса DayZInfected, что констатирует нам, что ZombieBase - этолько агрегатор (расширение) для DayZInfected-базового класса.
	Как можно понять проблему, тебе надо перегружать не класс ZmbM_NBC_Yellow, тебе надо перегружить DayZInfected.EEHitBy событие!
	
	Я советую обратить внимание на EntityAI source -> этот EntityAI - есть объект,который словил маслину на теле зомбя, с помощью этого ты можешь получить RootPlayer (в нашем случае это "RootZombie"-тело), после чего вызвать GetType(), для проверки класса RootPlayer и получения клааса объекта и если это mbM_NBC_Yellow -> делай обработку своего эвента, если нет - работай как с обычной химвойсковым зомби...
*/

 

 

On 2/19/2024 at 3:09 PM, Sid Debian said:

Because of string: /*||  другие условия для разных типов патронов */ I can suggest that you're Russian speaking. But I can't bet that's why I'll  to explain your mistake on both langs.
EN:
You have wrong signatures of your methods:


// Source: DayZ\dta\scripts\4_World\Entities\Creatures\Infected\ZombieBase.c
class ZombieBase extends DayZInfected
{
	override void EEHitBy(TotalDamageResult damageResult, int damageType, EntityAI source, int component, string dmgZone, string ammo, vector modelPos, float speedCoef)
	{
		super.EEHitBy(damageResult, damageType, source, component, dmgZone, ammo, modelPos, speedCoef);
	}
}

// Source: DayZ\dta\scripts\4_World\Entities\Creatures\Infected\ZombieMaleBase.c
/ /When you trying to override with another signature:
modded class ZmbM_NBC_Yellow : ZombieBase
{
    override void EEHitBy(TotalDamageResult damageResult, int damageType, EntityAI source, string component, string ammo, vector modelPos)
    {
	}
}
/* Let's compare both funstions:
	ZombieBase: 
		void EEHitBy(TotalDamageResult damageResult, int damageType, EntityAI source, int component, string dmgZone, string ammo, vector modelPos, float speedCoef)
	ZmbM_NBC_Yellow:
		void EEHitBy(TotalDamageResult damageResult, int damageType, EntityAI source, string component, string ammo, vector modelPos)
		
	The difference is 4th element inside the function: on ZombieBase it's INT component; on ZmbM_NBC_Yellow it's STRING component; so that's why it will not working.
	Then, you're trying to extend from ZombieBase but your method is not inside ZombieBase, that method is located inside DayZInfected class, that means that ZombieBase is only the wrapper for DayZInfected base class.
	And as you can understand from the problem you need to override not the ZmbM_NBC_Yellow, you need to override the DayZInfected.EEHitBy event!
	
	I suggest you to explore the EntityAI source -> that Item is item on model that got Hit, with it you can get RootPlayer (in ours case it's RootZombie body) and then call GetType(), for check the Classname of zombie and if it's ZmbM_NBC_Yellow -> do one case else ...
*/

RU:

У тебя проблема в подписи события, который ты вызываешь:
 


// Исходник: DayZ\dta\scripts\4_World\Entities\Creatures\Infected\ZombieBase.c
class ZombieBase extends DayZInfected
{
	override void EEHitBy(TotalDamageResult damageResult, int damageType, EntityAI source, int component, string dmgZone, string ammo, vector modelPos, float speedCoef)
	{
		super.EEHitBy(damageResult, damageType, source, component, dmgZone, ammo, modelPos, speedCoef);
	}
}

// Исходник: DayZ\dta\scripts\4_World\Entities\Creatures\Infected\ZombieMaleBase.c
// Когда как ты пытаешься перегрузить другую сигнатуру:
modded class ZmbM_NBC_Yellow : ZombieBase
{
    override void EEHitBy(TotalDamageResult damageResult, int damageType, EntityAI source, string component, string ammo, vector modelPos)
    {
	}
}
/* Сравним оба события:
	ZombieBase: 
		void EEHitBy(TotalDamageResult damageResult, int damageType, EntityAI source, int component, string dmgZone, string ammo, vector modelPos, float speedCoef)
	ZmbM_NBC_Yellow:
		void EEHitBy(TotalDamageResult damageResult, int damageType, EntityAI source, string component, string ammo, vector modelPos)
		
	Отличие в 4м аргументе при вызове события: на ZombieBase это INT(число) component, когда как в ZmbM_NBC_Yellow это STRING(строка) component, вот почему это не работает.
	Затем ты пытаешься происходить класс от ZombieBase, но твоё событие не принадлежит ZombieBase, это событие наслудуется из класса DayZInfected, что констатирует нам, что ZombieBase - этолько агрегатор (расширение) для DayZInfected-базового класса.
	Как можно понять проблему, тебе надо перегружать не класс ZmbM_NBC_Yellow, тебе надо перегружить DayZInfected.EEHitBy событие!
	
	Я советую обратить внимание на EntityAI source -> этот EntityAI - есть объект,который словил маслину на теле зомбя, с помощью этого ты можешь получить RootPlayer (в нашем случае это "RootZombie"-тело), после чего вызвать GetType(), для проверки класса RootPlayer и получения клааса объекта и если это mbM_NBC_Yellow -> делай обработку своего эвента, если нет - работай как с обычной химвойсковым зомби...
*/

 


I have the same error even if i try to modded base class modded class ZombieBase

 

Share this post


Link to post
Share on other sites
1 hour ago, steam-76561198036675139 said:

 

 


I have the same error even if i try to modded base class modded class ZombieBase

 

Oki tomorrow I'll try to manually override classes based on your code. Maybe I'll able to find what do we missed...

  • Like 1

Share this post


Link to post
Share on other sites
2 hours ago, steam-76561198036675139 said:

Thankful to you

 

It's no use. Today was messy day for me so had no time for dayz scripting. I'm sorry...

Share this post


Link to post
Share on other sites
19 hours ago, steam-76561198036675139 said:

Ok, i`ll wait)

 

I had done it.

There the code:

Spoiler

modded class ZmbM_NBC_Yellow extends ZombieMaleBase
{
	override void EEHitBy(TotalDamageResult damageResult, int damageType, EntityAI source, int component, string dmgZone, string ammo, vector modelPos, float speedCoef)
    {
        if (ammo == "Bullet_357")
        {
			Print("Ouch God DAMN YA, STOP SHOOTING ME AN IDIOT! You've been enganed: "+this.GetType()+", hitted with ammo: "+ammo);	// Information about the WEapon that engaged the Zombie!!!!
			float Health = 0.0;
            float currentDamage = damageResult.GetDamage(dmgZone, "Health");
            float newDamage = currentDamage * 100500;	// 100500 - use your any float value (1.5 or any other value)
            //source.AddHealth(damageType, "Health", -newDamage); // -newDamage -> meanth that we're removing ammount of health from an item! TO THE HECK ALL OF IT
			this.AddHealth("", "Health", -newDamage);	//Set body's global damage
			/*if (source)
			{
				source.SetHealth(-newDamage);	// Set damage to targetUnit. It's a zombie not the SuperMen(tos)! So let's kill him or apply damage. If we got damage less then 0 then we got heal action!
			}*/
			//ZombieMaleBase targetUnit = ZombieMaleBase.Cast(source.GetHierarchyRootPlayer());	// Requesting the Root of Unit and let's set damage then! Yeah I know it useless but maybe you'll need it somewhere as a cheat...
			// P.S. That might be uselfull if you wish to damage other stuff on the Zombie body. 4 example - you shooting in the head of Zmb and wish to damage the body armour and everything so...
			//	use it for working with the body slots!
			
			
			/* Results:
			SCRIPT       : Ouch God DAMN YA, STOP SHOOTING ME AN IDIOT! You've been enganed: ZmbM_NBC_Yellow, hitted with ammo: Bullet_357
			SCRIPT       : Ouch God DAMN YA, STOP SHOOTING ME AN IDIOT! You've been enganed: ZmbM_NBC_Yellow, hitted with ammo: Bullet_357
			SCRIPT       : Ouch God DAMN YA, STOP SHOOTING ME AN IDIOT! You've been enganed: ZmbM_NBC_Yellow, hitted with ammo: Bullet_357
			*/
        }
        super.EEHitBy(damageResult, damageType, source, component, dmgZone, ammo, modelPos, speedCoef);
    }
};

 

 

Share this post


Link to post
Share on other sites
On 2/22/2024 at 7:38 PM, Sid Debian said:

I had done it.

There the code:

  Reveal hidden contents


modded class ZmbM_NBC_Yellow extends ZombieMaleBase
{
	override void EEHitBy(TotalDamageResult damageResult, int damageType, EntityAI source, int component, string dmgZone, string ammo, vector modelPos, float speedCoef)
    {
        if (ammo == "Bullet_357")
        {
			Print("Ouch God DAMN YA, STOP SHOOTING ME AN IDIOT! You've been enganed: "+this.GetType()+", hitted with ammo: "+ammo);	// Information about the WEapon that engaged the Zombie!!!!
			float Health = 0.0;
            float currentDamage = damageResult.GetDamage(dmgZone, "Health");
            float newDamage = currentDamage * 100500;	// 100500 - use your any float value (1.5 or any other value)
            //source.AddHealth(damageType, "Health", -newDamage); // -newDamage -> meanth that we're removing ammount of health from an item! TO THE HECK ALL OF IT
			this.AddHealth("", "Health", -newDamage);	//Set body's global damage
			/*if (source)
			{
				source.SetHealth(-newDamage);	// Set damage to targetUnit. It's a zombie not the SuperMen(tos)! So let's kill him or apply damage. If we got damage less then 0 then we got heal action!
			}*/
			//ZombieMaleBase targetUnit = ZombieMaleBase.Cast(source.GetHierarchyRootPlayer());	// Requesting the Root of Unit and let's set damage then! Yeah I know it useless but maybe you'll need it somewhere as a cheat...
			// P.S. That might be uselfull if you wish to damage other stuff on the Zombie body. 4 example - you shooting in the head of Zmb and wish to damage the body armour and everything so...
			//	use it for working with the body slots!
			
			
			/* Results:
			SCRIPT       : Ouch God DAMN YA, STOP SHOOTING ME AN IDIOT! You've been enganed: ZmbM_NBC_Yellow, hitted with ammo: Bullet_357
			SCRIPT       : Ouch God DAMN YA, STOP SHOOTING ME AN IDIOT! You've been enganed: ZmbM_NBC_Yellow, hitted with ammo: Bullet_357
			SCRIPT       : Ouch God DAMN YA, STOP SHOOTING ME AN IDIOT! You've been enganed: ZmbM_NBC_Yellow, hitted with ammo: Bullet_357
			*/
        }
        super.EEHitBy(damageResult, damageType, source, component, dmgZone, ammo, modelPos, speedCoef);
    }
};

 

 

Thank you very much, everything works as it should. I was close to implementation, but lacked programming knowledge. Thanks again.

 

Share this post


Link to post
Share on other sites
1 hour ago, steam-76561198036675139 said:

Thank you very much, everything works as it should. I was close to implementation, but lacked programming knowledge. Thanks again.

 

Always welcome!

And I'm sorry i didn't spot a mistake in your code:

class XYZ : ABC { <- That's only for the config.cpp classes, when:

class XYZ extends ABC { <- can be applied for a scripts classes.

That's quite important to keep your eyes on that 2 cases to solve such small but annoying problems.

Share this post


Link to post
Share on other sites

×