Character? Actor? Or pawn? And

Hi everyone. I am quite new to unreal and game programming to begin with for that matter however I do feel as if I am normally resourceful enough to find information on my own however this time I am lost and need a push in the right direction.

Here’s my issue I am looking to create a board game and I am trying to figure out how to have my characters move on the board.
-blueprint to generate a random number based on an event at each players turn for a “dice roll”
-should I make a character or a pawn to apply that number to it.

  • how and where do I input this random number to force the character to move.
    -/////// I am lightly familiar with setting up standard movement for third and first person perspective

I figure I will need to create a “pawn” as each player and have an event to trigger a “dice roll” but i dont know how to have this integer interact with my game board titles. If anyone has and clue how i should go about learning this i would appreciate the suggestions and if you know of any tutorials i could watch the somewhat relate to my question i would appreciate that as well.

For anyone who has taken the time to read this. Thank you I appreciate the effort

Hi, the answer is: it depends and without more exact information about your setup or what you’re trying to do, I can only give you some basic information (cause all I know about what you’re trying to do right now is: I’m trying to do a board game, (is it real time, or round based, or… ; is it multiplayer or single player?, do you have bots?, if so, then does the player control them? how many players/figures do you planning to have?, what’s the goal of the game, how does it work/how should it work?

What should happen if you roll a dice?, so will the player figure move, will all figures move, do you choose one figure, …? And where do they move to?, so how are your fields connected, is it one way straight forward, or do you have several ways, or do you have connected tiles, or…?


Ok long talk from me :slight_smile: now for the general information

The character already has movement build into it and the movement does automatically replicate. So this would be the easiest solution. Of course if you would have hundreds of moving objects in your game, then using characters might be a bad idea due to performance.

And if your game would be round based, then you might not need to replicate movement but just say to each client: Figure A moves to Field X and just do the movement on each client. That would save you network bandwidth.

If you want to possess them with a controller (player or AI), then you would need to use either pawn or character.


how and where do I input this random
number to force the character to move

You could use a Custom Event to input the number, and then do the movement from there.
Depending on how your game looks like, the movement could be as easy as “Move To” Move to Location | Unreal Engine 5.2 Documentation

And there is also a node called “GetAllActorsOfClass” that might be useful for you https://docs.unrealengine.com/en-US/BlueprintAPI/Utilities/GetAllActorsOfClass/index.html

And maybe this would be useful for you: https://www.youtube.com/watch?v=-ZdEMYlGxl4 it’s a live stream where they talk about a chess board game.

Thanks a ton Chrudimer this was quite helpful insightful. for a little more clarification it is round based.
is the game turn based? - so each player would have a turn and they would roll a dice to decide the amount of tiles their character can move.
the board will have predetermined paths and and at intersections there may be an option to turn if you know what i mean.
at the moment AI is out of reach i may implement them once i am more knowledgeable however i plan to leave them out at the moment.
How many players in a game: 2 - 8
Goal of game: play a predetermined number of turns and complete as many objectives as possible before the end of the final turn. most objectives complete is the winner.

the way i expect a standard turn to proceed is as follows.
Player 1 >> use item? >> if yes use it… >> roll dice >> player pawn moves automatically that distance>> if intersection ask which path to take >> travel remaining spaces in that direction >> reach final space >> what is the final space? >> apply outcome of that space to player (example get 5 points) >> end turn >> begin player 2 turn

something like that

no matter what happens youve given me enough information in your first response to help me progress so thanks for that i really appreciate it. figuring out how to learn this engine from scratch without any coaches is a bit daunting.

Ok, then I would use actors for the tiles. Each tile could hold an array of tiles where the player can move to next (in a straight path this array would only contain one tile, but on an intersection it would contain several ones).

Then inside the player pawn I would save the tile the player is currently on in a variable. Then for the movement I think I would use two Functions/Custom Events:

(1) to project the movement, so to which tile should the player move

(2) do the actual movement

So for (1) I would input the tile the player is currently on, an index (to access the array of tiles inside the tile, so to know which way to take at an intersection), and the amount of steps to take (at first the number from the dice). Then you could do a for loop and in each step count down the number of steps by one and get the next tile. Continue until either the step count is at 0, or you reach a field that would need a player decision (for example an intersection). Then the output would be: the last field, the remaining step count (0 if there was no field that would require player interaction).

Then check that outputted field and see if it requires player interaction, if so do the interaction logic. Then if the remaining step count is > 0, then call (1) again.

So basically

inside the pawn

And the base tile blueprint (it only contains two variables nothing else)

So you might wanna add at least a mesh to it. And this is only to give you the basic idea, you would need to fill in more code and maybe change some here (especially for multiplayer).

And for an inventory this might be useful to give you some basic idea: https://www.youtube.com/watch?v=r4tltrLLVuQ

This helped me really understand animations in UE: https://www.youtube.com/watch?v=YVC-DL9Ibf0

And if you wanna do multiplayer and wanna learn how to connect the players: https://www.youtube.com/watch?v=abmzWUWxy1U

And here is some useful information about UE and multiplayer but it is quite much, so don’t need to learn it all right away, but it might be useful to look at it if you have a problem: Multiplayer Network Compendium | An Unreal Engine Blog by Cedric Neukirchen

And always useful is the UE online learning: https://www.unrealengine.com/en-US/onlinelearning-courses You might wanna watch the “AEC Blueprints by Example”.

And here they are creating a small game: https://www.youtube.com/watch?v=yS-yQfo0lc0 Might be useful for you, depending on how much knowledge about blueprints you already have (if you already have some good understanding about blueprints, then it might be useless)

What is important for UE and multiplayer replication is: Mark Custom Events that must come through
as “reliable”, else they might get dropped if your using too much network bandwidth (I spend some days figuring out why my code randomly did not execute). So something like respawning the client → reliable since if that does not happen it breaks the game for the client; something like a multicast to spawn an effect → the game will continue even without it, so not reliable.

figuring out how to learn this engine
from scratch without any coaches is a
bit daunting.

Yeah you’re right, in the beginning I watched countless hours of tutorials and just redid them step by step :slight_smile:

And of course you’ve also got the Answerhub and the Forums.

Thanks a lot Chrudimer this is extremely helpful you’ve given me a ton of food for thought now. I appreciate it a lot. ill probably watch all of those videos you recommend among probably a thousand or so more lol.

thanks for laying out he blueprint foundation for me and laying out some logical order to all this. it is still a foreign language to me though. But i do learn best by doing so i think this will help boost the process. ill keep learning and practicing and ill have this implemented as soon as I can.

again thanks so much i realise that you have put a lot of effort to help me solve my problem and i appreciate the effort a lot!