Reference to variable in game map

Hello :slight_smile:

I’m trying to program a game with blueprint only. On each map, there are 3 camps where characters can be teleport if they hit another character. I define the spawns with PlayerStarts (from 1 to 5, for each camp) in each level blueprint of the map. To gain time, I would like to set events in my GameMode where it says :
If a character hit another one, teleport (with conditions) to the playerstart 1 of this camp in this map.

My issue is I don’t know how to refer to a level blueprint map… Anyone can help me? :slight_smile:

Thanks for all !

Unfortunately you cannot cast to the level blueprint, period. This is just not possible. you will want to instead put this logic into your game mode blueprint. Heres the documentation page to get you started on changing the game mod: https://docs.unrealengine.com/en-US/Gameplay/HowTo/SettingUpAGameMode/Blueprints/index.html

I understand, thank you ! :slight_smile:

I guess I need to create a character Blueprint per maps, to change the values of spawn points :slight_smile:

Thanks a lot :slight_smile: May I contact you if i have any question on UE4 ? (I’ve really novice but I learn quickly) !

feel free to keep posting the issues that come up via replies with this particular mechanic thing as your making it, and we can give you feedback/help as your progressing through it. That will keep the process organized and novices in the future will have a breadcrumb trail to follow as well!

So that is why I recommend the game mode blueprint. if the basic logic that occurs at the beginning is a get all actors (player start) you can create a function that any actor can call using a get gamemode node, which is very convenient, and it can call/request a respawn.

The game mode is ideal for this since once you create this logic and player interaction for one map. as long as you use the same gamemode in the other maps everything will work out just fine. so you will need to create the mechanics once, and then can use them in any number of maps as long as they have player starts.

313563-gamemode.png