Jump to content
gokitty1199

Cannot overload constructors?

Recommended Posts

So far im just tinkering around with it to familiarize myself, but one thing ive noticed is that i dont think you can overload constructors? Unless I am doing this wrong, it seems to be the case but i wanted to make sure

SetUnitLoadout suw = new SetUnitLoadout(player, "VSS");//says to many parameters


class SetUnitLoadout
{
	private EntityAI weapon;

	void SetUnitLoadout(PlayerBase player)
	{
		this.weapon = player.GetHumanInventory().CreateInHands("M4A1_Green");
	}
	void SetUnitLoadout(PlayerBase player, string weaponName)
	{	
		this.weapon = player.GetHumanInventory().CreateInHands(weaponName);
	}
};

 

Share this post


Link to post
Share on other sites

I don't think so. I remember seeing someone mention it was a reported enscript bug / missing feature.

  • Like 1

Share this post


Link to post
Share on other sites
6 minutes ago, smasht said:

I don't think so. I remember seeing someone mention it was a reported enscript bug / missing feature.

ah thank you, that would explain why. any idea when an official wiki will be up in regards to scripting? im liking the setup so far as it feels natural, but i am struggling to find commands lol.

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

×