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

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

×