I wanted to add gender-specific translations for Spanish & Portuguese translations of my workshop game based on the hero chosen.
For Spanish:
If the player chose a male hero, the string will say “inmovilizado”.
If female hero, it will say “inmovilizada”.
If Bastion, it will say “inmovilizade”.
But when I test out the workshop game, it ends up with “inmovilizade” regardless of the hero chosen. Can fix?
You can see these 2 rules that trigger the condition:
“ES: After player has died, he/she will be unable to move for 6 seconds (rule by me, improved by Delwion)”
“Initialize heroes (for Spanish & Portugese gender-specific translations)”
The rule code:
rule("ES: After player has died, he/she will be unable to move for 6 seconds (rule by me, improved by Delwion)")
{
event
{
Ongoing - Each Player;
All;
All;
}
conditions
{
Is Game In Progress == True;
Event Player.PlayerDied == True;
Health(Event Player) == True;
}
actions
{
Wait(1, Ignore Condition);
Disable Messages(Event Player);
Set Status(Event Player, Null, Asleep, 5);
Set Status(Event Player, Null, Invincible, 5);
Set Status(Event Player, Null, Rooted, 5);
Event Player.hudTimer = Total Time Elapsed;
If(Hero Of(Event Player) == Global.MaleHeroes);
Create HUD Text(Event Player, Custom String("¡Inmovilizado: {0}!", Round To Integer(Event Player.hudTimer + 5 - Total Time Elapsed,
Up)), Null, Null, Top, 1, Color(Aqua), Color(Aqua), Color(Aqua), Visible To and String, Default Visibility);
Else If(Hero Of(Event Player) == Global.FemaleHeroes);
Create HUD Text(Event Player, Custom String("¡Inmovilizada: {0}!", Round To Integer(Event Player.hudTimer + 5 - Total Time Elapsed,
Up)), Null, Null, Top, 1, Color(Aqua), Color(Aqua), Color(Aqua), Visible To and String, Default Visibility);
Else;
Create HUD Text(Event Player, Custom String("¡Inmovilizade: {0}!", Round To Integer(Event Player.hudTimer + 5 - Total Time Elapsed,
Up)), Null, Null, Top, 1, Color(Aqua), Color(Aqua), Color(Aqua), Visible To and String, Default Visibility);
End;
Event Player.UnableMsgTxt = Last Text ID;
}
}
rule("Initialize heroes (for Spanish & Portugese gender-specific translations)")
{
event
{
Ongoing - Global;
}
actions
{
Global.MaleHeroes = Array(Hero(Baptiste), Hero(Doomfist), Hero(Genji), Hero(Hanzo), Hero(Junkrat), Hero(Lúcio), Hero(McCree), Hero(
Reaper), Hero(Soldier: 76), Hero(Torbjörn), Hero(Wrecking Ball), Hero(Zenyatta));
Global.FemaleHeroes = Array(Hero(Ana), Hero(Ashe), Hero(Brigitte), Hero(D.Va), Hero(Echo), Hero(Mei), Hero(Mercy), Hero(Moira),
Hero(Pharah), Hero(Sombra), Hero(Symmetra), Hero(Tracer), Hero(Widowmaker));
}
}
Here’s the share code to try out (Spanish): XQQ5M