Search in
Sort by:

Question Status:

Search help

  • Simple searches use one or more words. Separate the words with spaces (cat dog) to search cat,dog or both. Separate the words with plus signs (cat +dog) to search for items that may contain cat but must contain dog.
  • You can further refine your search on the search results page, where you can search by keywords, author, topic. These can be combined with each other. Examples
    • cat dog --matches anything with cat,dog or both
    • cat +dog --searches for cat +dog where dog is a mandatory term
    • cat -dog -- searches for cat excluding any result containing dog
    • [cats] —will restrict your search to results with topic named "cats"
    • [cats] [dogs] —will restrict your search to results with both topics, "cats", and "dogs"

Store a PlayerStart in BasePlayerClass


I have C++ FPS project. With simple ASpawnClassActor, which extending ANavigationObjectBase, In short its just like engine PlayerStart but with more properties (isTeamleader, isSquadLeader, teamName, locked, health, class).

I have placed these actors on map, then in Level blueprint I iterate thru all actors for specific team and let player pick one spawn point.

Now comes problem.

I want to store in variable a object reference of selected spawnpoint.I think best place is to store it in BasePlayerController

I have created a variable in BasePlayerController.h

     // Holds where to Spawn player
     // TSubclassOf<AActor> SpawnClassActor;
     // ANavigationObjectBase* SpawnClassActor;
     UPROPERTY(EditAnywhere, BlueprintReadWrite, Category = PlayerController)
         ASpawnClassActor* SpawnClassActor;
     UFUNCTION(BlueprintCallable, Category = PlayerController)
     void SetSpawn(ASpawnClassActor* Spawn);

Then I have preSpawn screen Blueprint widget which contains list of spawn actors (ClassItem) alt text

When user click on Select specific spawn class, I want to send Object reference to C++ (ASpawnClassActor* SpawnClassActor) and after there is custom PlayerSpawnSearch implementation (which i hope works).

Now I am saving the reference of SpawnClass incorrectly, but I dont know how to fix it.

alt text

Any help is welcome, probably I dont understand correctly communications between Blueprint and C++. ¨ Thanks for reply

Product Version: UE 4.18
bp1.png (105.8 kB)
bp2.png (86.1 kB)
more ▼

asked Nov 24 '18 at 08:58 AM in C++ Programming

avatar image

1 1 2

(comments are locked)
10|2000 characters needed characters left
Viewable by all users

0 answers: sort voted first
Be the first one to answer this question
toggle preview:

Up to 5 attachments (including images) can be used with a maximum of 5.2 MB each and 5.2 MB total.

Follow this question

Once you sign in you will be able to subscribe for any updates here

Answers to this question