Errors in my RTS tutorial game.

Hey guys I recently started following a guide to create an RTS game, I’ve been using star wars 3d Models as I’m trying to create a Star Wars themed RTS.
The channel is BuildGamesWithJon and i made it to the 7th video(RTS Multiplayer Setup) where Jon had us create a mainmenu widget and spawn locations and have the game spawn a building and a couple of units.

Im getting like 40 errors, here they are.
Blueprint Runtime Error: “Accessed None trying to read property SelectedPlayerStartCamp”. Node: SpawnActor Camera Pawn Graph: EventGraph Function: Execute Ubergraph RTS Game Mode Base Blueprint: RTS_GameModeBase
Blueprint Runtime Error: “Accessed None”. Node: SpawnActor Camera Pawn Graph: EventGraph Function: Execute Ubergraph RTS Game Mode Base Blueprint: RTS_GameModeBase
Blueprint Runtime Error: “Accessed None trying to read property SelectedPlayerStartCamp”. Node: SpawnActor Camera Pawn Graph: EventGraph Function: Execute Ubergraph RTS Game Mode Base Blueprint: RTS_GameModeBase
Blueprint Runtime Error: “Accessed None”. Node: SpawnActor Camera Pawn Graph: EventGraph Function: Execute Ubergraph RTS Game Mode Base Blueprint: RTS_GameModeBase
Blueprint Runtime Error: “Accessed None trying to read property K2Node_Event_PlayerStartCamp”. Node: SpawnActor First Building Graph: SpawnPlayerStartingLoadout Function: Execute Ubergraph RTS Player Controller Blueprint: RTS_PlayerController
Blueprint Runtime Error: “Accessed None”. Node: SpawnActor First Building Graph: SpawnPlayerStartingLoadout Function: Execute Ubergraph RTS Player Controller Blueprint: RTS_PlayerController
Blueprint Runtime Error: “Accessed None trying to read property K2Node_Event_PlayerStartCamp”. Node: SpawnActor First Building Graph: SpawnPlayerStartingLoadout Function: Execute Ubergraph RTS Player Controller Blueprint: RTS_PlayerController
Blueprint Runtime Error: “Accessed None”. Node: SpawnActor First Building Graph: SpawnPlayerStartingLoadout Function: Execute Ubergraph RTS Player Controller Blueprint: RTS_PlayerController
Blueprint Runtime Error: “Accessed None trying to read property K2Node_Event_PlayerStartCamp”. Node: SpawnActor Unit Style 1 Graph: SpawnPlayerStartingLoadout Function: Execute Ubergraph RTS Player Controller Blueprint: RTS_PlayerController
Blueprint Runtime Error: “Accessed None”. Node: SpawnActor Unit Style 1 Graph: SpawnPlayerStartingLoadout Function: Execute Ubergraph RTS Player Controller Blueprint: RTS_PlayerController
Blueprint Runtime Error: “Accessed None trying to read property K2Node_Event_PlayerStartCamp”. Node: SpawnActor Unit Style 1 Graph: SpawnPlayerStartingLoadout Function: Execute Ubergraph RTS Player Controller Blueprint: RTS_PlayerController
Blueprint Runtime Error: “Accessed None”. Node: SpawnActor Unit Style 1 Graph: SpawnPlayerStartingLoadout Function: Execute Ubergraph RTS Player Controller Blueprint: RTS_PlayerController
Blueprint Runtime Error: “Accessed None trying to read property K2Node_Event_PlayerStartCamp”. Node: SpawnActor Unit Style 1 Graph: SpawnPlayerStartingLoadout Function: Execute Ubergraph RTS Player Controller Blueprint: RTS_PlayerController
Blueprint Runtime Error: “Accessed None”. Node: SpawnActor Unit Style 1 Graph: SpawnPlayerStartingLoadout Function: Execute Ubergraph RTS Player Controller Blueprint: RTS_PlayerController
Blueprint Runtime Error: “Accessed None trying to read property K2Node_Event_PlayerStartCamp”. Node: SpawnActor Unit Style 1 Graph: SpawnPlayerStartingLoadout Function: Execute Ubergraph RTS Player Controller Blueprint: RTS_PlayerController
Blueprint Runtime Error: “Accessed None”. Node: SpawnActor Unit Style 1 Graph: SpawnPlayerStartingLoadout Function: Execute Ubergraph RTS Player Controller Blueprint: RTS_PlayerController
Blueprint Runtime Error: “Accessed None trying to read property K2Node_Event_PlayerStartCamp”. Node: SpawnActor Unit Style 1 Graph: SpawnPlayerStartingLoadout Function: Execute Ubergraph RTS Player Controller Blueprint: RTS_PlayerController
Blueprint Runtime Error: “Accessed None”. Node: SpawnActor Unit Style 1 Graph: SpawnPlayerStartingLoadout Function: Execute Ubergraph RTS Player Controller Blueprint: RTS_PlayerController
Blueprint Runtime Error: “Accessed None trying to read property K2Node_Event_PlayerStartCamp”. Node: SpawnActor Unit Style 1 Graph: SpawnPlayerStartingLoadout Function: Execute Ubergraph RTS Player Controller Blueprint: RTS_PlayerController
Blueprint Runtime Error: “Accessed None”. Node: SpawnActor Unit Style 1 Graph: SpawnPlayerStartingLoadout Function: Execute Ubergraph RTS Player Controller Blueprint: RTS_PlayerController
Blueprint Runtime Error: “Accessed None trying to read property SelectedPlayerStartCamp”. Node: SpawnActor Camera Pawn Graph: EventGraph Function: Execute Ubergraph RTS Game Mode Base Blueprint: RTS_GameModeBase
Blueprint Runtime Error: “Accessed None”. Node: SpawnActor Camera Pawn Graph: EventGraph Function: Execute Ubergraph RTS Game Mode Base Blueprint: RTS_GameModeBase
Blueprint Runtime Error: “Accessed None trying to read property SelectedPlayerStartCamp”. Node: SpawnActor Camera Pawn Graph: EventGraph Function: Execute Ubergraph RTS Game Mode Base Blueprint: RTS_GameModeBase
Blueprint Runtime Error: “Accessed None”. Node: SpawnActor Camera Pawn Graph: EventGraph Function: Execute Ubergraph RTS Game Mode Base Blueprint: RTS_GameModeBase
Blueprint Runtime Error: “Accessed None trying to read property K2Node_Event_PlayerStartCamp”. Node: SpawnActor First Building Graph: SpawnPlayerStartingLoadout Function: Execute Ubergraph RTS Player Controller Blueprint: RTS_PlayerController
Blueprint Runtime Error: “Accessed None”. Node: SpawnActor First Building Graph: SpawnPlayerStartingLoadout Function: Execute Ubergraph RTS Player Controller Blueprint: RTS_PlayerController
Blueprint Runtime Error: “Accessed None trying to read property K2Node_Event_PlayerStartCamp”. Node: SpawnActor First Building Graph: SpawnPlayerStartingLoadout Function: Execute Ubergraph RTS Player Controller Blueprint: RTS_PlayerController
Blueprint Runtime Error: “Accessed None”. Node: SpawnActor First Building Graph: SpawnPlayerStartingLoadout Function: Execute Ubergraph RTS Player Controller Blueprint: RTS_PlayerController
Blueprint Runtime Error: “Accessed None trying to read property K2Node_Event_PlayerStartCamp”. Node: SpawnActor Unit Style 1 Graph: SpawnPlayerStartingLoadout Function: Execute Ubergraph RTS Player Controller Blueprint: RTS_PlayerController
Blueprint Runtime Error: “Accessed None”. Node: SpawnActor Unit Style 1 Graph: SpawnPlayerStartingLoadout Function: Execute Ubergraph RTS Player Controller Blueprint: RTS_PlayerController
Blueprint Runtime Error: “Accessed None trying to read property K2Node_Event_PlayerStartCamp”. Node: SpawnActor Unit Style 1 Graph: SpawnPlayerStartingLoadout Function: Execute Ubergraph RTS Player Controller Blueprint: RTS_PlayerController
Blueprint Runtime Error: “Accessed None”. Node: SpawnActor Unit Style 1 Graph: SpawnPlayerStartingLoadout Function: Execute Ubergraph RTS Player Controller Blueprint: RTS_PlayerController
Blueprint Runtime Error: “Accessed None trying to read property K2Node_Event_PlayerStartCamp”. Node: SpawnActor Unit Style 1 Graph: SpawnPlayerStartingLoadout Function: Execute Ubergraph RTS Player Controller Blueprint: RTS_PlayerController
Blueprint Runtime Error: “Accessed None trying to read property K2Node_Event_PlayerStartCamp”. Node: SpawnActor Unit Style 1 Graph: SpawnPlayerStartingLoadout Function: Execute Ubergraph RTS Player Controller Blueprint: RTS_PlayerController
Blueprint Runtime Error: “Accessed None”. Node: SpawnActor Unit Style 1 Graph: SpawnPlayerStartingLoadout Function: Execute Ubergraph RTS Player Controller Blueprint: RTS_PlayerController
Blueprint Runtime Error: “Accessed None”. Node: SpawnActor Unit Style 1 Graph: SpawnPlayerStartingLoadout Function: Execute Ubergraph RTS Player Controller Blueprint: RTS_PlayerController
Blueprint Runtime Error: “Accessed None trying to read property K2Node_Event_PlayerStartCamp”. Node: SpawnActor Unit Style 1 Graph: SpawnPlayerStartingLoadout Function: Execute Ubergraph RTS Player Controller Blueprint: RTS_PlayerController
Blueprint Runtime Error: “Accessed None”. Node: SpawnActor Unit Style 1 Graph: SpawnPlayerStartingLoadout Function: Execute Ubergraph RTS Player Controller Blueprint: RTS_PlayerController
Blueprint Runtime Error: “Accessed None trying to read property K2Node_Event_PlayerStartCamp”. Node: SpawnActor Unit Style 1 Graph: SpawnPlayerStartingLoadout Function: Execute Ubergraph RTS Player Controller Blueprint: RTS_PlayerController
Blueprint Runtime Error: “Accessed None”. Node: SpawnActor Unit Style 1 Graph: SpawnPlayerStartingLoadout Function: Execute Ubergraph RTS Player Controller Blueprint: RTS_PlayerController
Here are some of my blueprints.

RTS GameModeBase:




Spawn Player Starting Loudout Macro in RTSPlayerController:

I would greatly appreciate some assistance, this is my first time using UnrealEngine. Let me know if you need any other blueprints, Thank you.

Hey there @Ejmen2000! Welcome to the community! Wow! First time in engine and you’re going for multiplayer! That’s impressive! That said, judging from the error, you have some variables that have no reference being referenced.

Is SelectedPlayerStartCamp actually empty when you run this? It’s possible you’re generating/setting the reference at the same time and just looking for them before they are available. Where is SelectedPlayerStartCamp being selected? Is it being assigned before Starting New Player runs?

Hello, thank you for the kind words. Umm when I select the variable SelectedPlayerStartCamp the default value is none and its in no other blueprint besides the RTS_GameModeBase Event Graph. I’m more confused on how to fix the issue because I followed the video letter by letter up until this point and the author did not have this issue

Since it’s a game mode, it won’t have any defaults set because those are direct refs. So it looks like you set the Selected Player Start Camp randomly during the Starting New Player Event, however it’s pulling from player start camps, so player start camps likely has no items listed. Is there a part where you add the references to player start camps to that array?

Forgive me if I sound uninformed because this is my first time using this program but I don’t think their is a place where you add the reference.

RTS Game - Multiplayer Setup (4 Players) & Player Starting Camps - YouTube

Here is the video I watched I should have posted this earlier. The author does this part from 9 min to 12.

So is there anyone that can help me or at least redirect me to where I can actively be helped?

Apologies, I had gotten off work yesterday. So what we need to do is assign those objects to that array before that event itself gets called. So that event handler you have fires a couple ticks after the game starts, so you need to get all of the player camps and assign them to that array. You can do this in the construction script. It looks like you missed this part in the tutorial here (518 seconds/8:38):

image

If you did do this in the construction script, did you select your Player Start Camp BP in the Get All Actors of Class node? If so then are any of them placed around?

Hello again, yeah i did that part in the video. Here is the sc.

I did select Player Start Camp.


I didn’t place it anywhere i wasnt supposed to. It should be in the Event graph

If there aren’t any in the world when the game mode is constructed it will always error out, those start camps are basically just player start locations, the part after that in the video he shows that you spawn the player’s buildings on their location. So basically he wants you to manually place the locations you want them to possibly spawn at, then it picks a random one, then spawns the player there. As you can see he left his in the map itself. Though one change I would make would be to have a IsValid branch before it and print something if the array isn’t valid instead of error out.

Yeah i placed them in the three corners of the map so idk.

It’s still returning the error that you don’t have a reference there at all? Hrm, that’s odd. Alright, could you place a breakpoint (by the right click menu) on the Starting new player event and make a print node that loops through everything inside the player camps array when it gets set in the construction script as well as making that a breakpoint? This will pause the game when it runs those nodes so you can inspect what’s in them.


I added the breakpoint but I don’t know which print node you want me to add. And you want me to add a breakpoint in the construction script as well?

Alright so i ended up restarting the whole process of the video and this time around it worked. Thank you anyways for trying to help

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.