As a new UE user i was reading a lot about where to put variables (character BP, gamestate). Could you make a simple picture where to put variables if you have single player or multiplayer game. Like what to put into default pawn class, player controller class?
Hey, keep in mind that using the different default classes in Unreal is quite flexible and depends on your specific game design. However, in Multiplayer games the Game State is usually used to store information about the game world that should be accessible to all players. This could be the score of a match. The Player State has the same purpose but is simply for a single player. For example, you can store information about the player's number of kills or assists. In a Single player game, you might not need to use either the Player State or Game State. Personally, I think they still help you to organize data. For example you can store information about the health in the player state and information about spawned enemies in the game state. For the Character instance, you have to keep in mind that if the player dies and you destroy the current character instance and restart with a new one, certain information might be lost. For that reason, I only store data there that is linked to the specific character instance, which could also be the player's health. In the Player Controller, I mostly just try to store information about "controlling" the character, such as the different input actions. However, if there is information for the player that should persist between respawning the character instance, the player controller might also be a location to put those variables. Overall, you don't have to use every default class that Unreal provides. It really depends on the size and type of your project! Hope that helps!
Which GameMode class and GameState class are you using as a base for your custom classes? (So GameModeBase or GameMode and GameStateBase or GameState) So, if you are using GameMode, try to use GameState as the parent class for your Custom GameState class. If you are using GameModeBase try to use GamStateBase as the parent class. Certain functionalities of those classes are linked together, which might cause this problem. Let me know if that helps you!
@@PobatoTutorials This was the issue! I found out last night that they're not compatible and I misnamed my gamemodebase. Specifically for anyone reading, if you put a gamemodebase with a gamestate or a gamstatebase with a gamemode it will not fire begin play which can lead ot all sorts of different outcomes down the road in your project. For me it broke my input initialization.
As a new UE user i was reading a lot about where to put variables (character BP, gamestate). Could you make a simple picture where to put variables if you have single player or multiplayer game. Like what to put into default pawn class, player controller class?
Hey, keep in mind that using the different default classes in Unreal is quite flexible and depends on your specific game design.
However, in Multiplayer games the Game State is usually used to store information about the game world that should be accessible to all players. This could be the score of a match.
The Player State has the same purpose but is simply for a single player. For example, you can store information about the player's number of kills or assists.
In a Single player game, you might not need to use either the Player State or Game State. Personally, I think they still help you to organize data. For example you can store information about the health in the player state and information about spawned enemies in the game state.
For the Character instance, you have to keep in mind that if the player dies and you destroy the current character instance and restart with a new one, certain information might be lost. For that reason, I only store data there that is linked to the specific character instance, which could also be the player's health.
In the Player Controller, I mostly just try to store information about "controlling" the character, such as the different input actions. However, if there is information for the player that should persist between respawning the character instance, the player controller might also be a location to put those variables.
Overall, you don't have to use every default class that Unreal provides. It really depends on the size and type of your project!
Hope that helps!
When I use my own custom game state in the gamemode it breaks all my games inputs. I don't understand how these are related. Anyone know?
Which GameMode class and GameState class are you using as a base for your custom classes?
(So GameModeBase or GameMode and GameStateBase or GameState)
So, if you are using GameMode, try to use GameState as the parent class for your Custom GameState class.
If you are using GameModeBase try to use GamStateBase as the parent class.
Certain functionalities of those classes are linked together, which might cause this problem.
Let me know if that helps you!
@@PobatoTutorials This was the issue! I found out last night that they're not compatible and I misnamed my gamemodebase.
Specifically for anyone reading, if you put a gamemodebase with a gamestate or a gamstatebase with a gamemode it will not fire begin play which can lead ot all sorts of different outcomes down the road in your project. For me it broke my input initialization.
Nice that you figured it out!
for my expirience multiplayer lobby menu , everything dosen't work till someone tells me to put it to game state 🤣
¿Toon shader please?
Currently I'm focusing more on C++ content, but maybe in the future I will do tutorials about shader!