S
S
Sergey Grigorov2018-07-25 03:13:09
C++ / C#
Sergey Grigorov, 2018-07-25 03:13:09

Unreal Engine 4.19: C++ and related noob questions?

Hello toast people!
There are a few small questions.
1. How to declare a multidimensional array in Unreal Engine 4.19? Example:
FString myArray[] = {{“1”,”100”}, {“2”,”200”}};
2. Where is the best place to store player data?
Those. Now I'm imagining something like this:

Псевдокод:

AMyPawn::BeginPlay() — мы читаем данные из какого-либо файла, разбираем и сохраняем в переменных

I wanted to load data in the GameMode constructor, but, for example, when changing equipment, I don’t really want to pull two components.
And so I’ll just “pull” some function in AMyPawn that changes the mesh on a specific socket, and there I’ll overwrite the variable along the way and prepare the data for saving.
Should I use this method, or is there another, better one?
3. How can I get X,Y,Z values ​​for camera coordinates and position, as well as X,Y,Z values ​​for pawn and camera rotation?
How can they be set based on X,Y and Z float values?
On the third question, Google did not give anything at all (although, most likely, it was simply not there and was looking in the wrong way). The first one is also not thick.
Thank you in advance for your help.
PS I know that I am reinventing the wheel and everything I need in the engine has already been written down, but I really want to indulge in a bicycle for self-development.
PPS Blueprints is not to be advised. I want to comprehend these actions precisely from the pluses.

Answer the question

In order to leave comments, you need to log in

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question