|
Post by Samartha Sharma pro on Aug 4, 2022 18:40:46 GMT
I want character selection menu in my pixel crusher menu like in dead effect 2 as a example so players can choose thire own favourite character .Any help make me pro to solve out solutions
And thanks to Axbaby who always help me when I need help
|
|
eldv
Junior vMember
Posts: 47
|
Post by eldv on Sept 9, 2022 19:56:29 GMT
I want character selection menu in my pixel crusher menu like in dead effect 2 as a example so players can choose thire own favourite character .Any help make me pro to solve out solutions
And thanks to Axbaby who always help me when I need help I used the Easy Main Menu character selection and added a static class and variables to write to, and then read from in the play scene. I am not at my computer right now but I’ll see if I can’t dig up the scripts.
|
|
|
Post by Samartha Sharma pro on Sept 10, 2022 17:56:49 GMT
thanks but i have done it with character customization assest
|
|
|
Post by jlock10 on Nov 24, 2022 15:54:17 GMT
I want character selection menu in my pixel crusher menu like in dead effect 2 as a example so players can choose thire own favourite character .Any help make me pro to solve out solutions
And thanks to Axbaby who always help me when I need help I used the Easy Main Menu character selection and added a static class and variables to write to, and then read from in the play scene. I am not at my computer right now but I’ll see if I can’t dig up the scripts. I have the easy main menu addon. can you help me figure out how to load the character after you've selected the one you want to play with?
|
|
eldv
Junior vMember
Posts: 47
|
Post by eldv on Mar 23, 2023 3:52:40 GMT
Sorry for the late reply. I used a static class to store a variable that refers to the character.
public static class SelCharStatic
{ public static int playerindex = 0;
public static string playername;
public static int savedslotID;
public static int currentSpawnIndex = 0; }
the savedslotID and currentSpawnIndex are part of my custom Invector saver for the Dialogue System save, so those you can ignore.
Here is an example of the script I used to write the values to the static variables in the SelCharStatic class.
using System.Collections; using System.Collections.Generic; using UnityEngine; using EMM; using Invector;
public class SelectedChar : MonoBehaviour { public CharacterSelectMenuController charselmencon; public void onChosenChar() { charselmencon = FindObjectOfType<CharacterSelectMenuController>(); switch (charselmencon._currentSelectedCharName) { case "Grugg":
SelCharStatic.playerindex = 0; SelCharStatic.playername = "Grugg"; break;
case "Thrugg": SelCharStatic.playerindex = 1; SelCharStatic.playername = "Thrugg"; break;
case "Brugg": SelCharStatic.playerindex = 2; SelCharStatic.playername = "Brugg"; break;
default: Debug.LogError("No Player Prefab Found!"); break; } if (charselmencon != null) { Debug.Log("Player selected: " + charselmencon._currentSelectedCharName); } else { return; } Debug.Log("Character selected: " + charselmencon._currentSelectedCharName); }
}
|
|