Jump to content
Sign in to follow this  
caracal

Question about correct class inheritance

Recommended Posts

Hello,

I have a question about inheritance. Not sure if I understand it correctly.

 

class CfgAIBehaviours
{
	class Infected
	{
		name="zombie";
		HeadLookBoneName="lookat";
		teamName="Zombies";
		class BehaviourHLZombie
		{
			class MovementWalk
			{
				maxSpeed=1.5;//1.5
				minSpeed=0;
				acceleration=5;
				maxAngleSpeed=180;
				slowRadius=0;
				stopRadius=0.5;
				pathFilter="ZombieCalm";
			};

If I wanted to edit the class "MovementWalk" which is inside class "BehaviourHLZombie", how do I write this correctly so I do not empty all of class "CfgAIBehaviours"?

Is it enough to copy the Infected class along with the opening brackets of CfgAIBehaviours, and leave out the many other classes that are siblings of Infected?

Like so

 

class CfgAIBehaviours
{
	class Infected
	{
		name="zombie";
		HeadLookBoneName="lookat";
		teamName="Zombies";
		class BehaviourHLZombie
		//But not edit this, can I write this as 
        //class Infected;

		//And do I have to list all the other sibling classes of MovementWalk or can I leave them out without breaking stuff?
		{
			class MovementWalk
			{
				//I want to edit this
			};

 

Share this post


Link to post
Share on other sites

Please sign in to comment

You will be able to leave a comment after signing in



Sign In Now
Sign in to follow this  

×