This forum is locked and will eventually go offline. If you have feedback to share you can find us in our Discord channel "MythoLogic Interactive" https://discord.gg/nECKnbT7gk

Forum rules

Player outfit problem

Share questions, scripts and tutorials related to the ScriptAPI in SFD.
Forum rules
By using the forum you agree to the following rules.
Locked
User avatar
Astolfo
Fighter
Fighter
Posts: 13
Joined: Tue Jan 21, 2020 9:00 pm
Started SFD: I forgot

Player outfit problem

Post by Astolfo » Thu Feb 04, 2021 4:31 pm

I have a script that changes the player's clothing, but it is not suitable for the female gender.

Code: Select all

public void h(TriggerArgs args)
{
	if (args.Sender is IPlayer) 
	{
		IPlayer plr = (IPlayer)args.Sender;
		IProfile profile = plr.GetProfile();
		profile.ChestUnder = new IProfileClothingItem("Shirt", "ClothingWhite");
		profile.ChestOver = new IProfileClothingItem("Coat", "ClothingWhite", "ClothingDarkRed");
		profile.Legs = new IProfileClothingItem("Pants", "ClothingWhite");
		profile.Feet = new IProfileClothingItem("Shoes", "ClothingWhite");
		plr.SetProfile(profile);
	}
}
0 x
Hello world

User avatar
Gurt
Lead Programmer
Lead Programmer
Posts: 1887
Joined: Sun Feb 28, 2016 3:22 pm
Title: Lead programmer
Started SFD: Made it!
Location: Sweden
Gender:
Age: 36

Post by Gurt » Thu Mar 18, 2021 6:45 pm

Female items are often named with the suffix "_fem". You can see this in the Data/Items folder within the game's content.
0 x
Gurt

Locked