Download

how to "wait for other players" before teleporting to the next point?

hey all,

this one is giving me a headache. I have set up trigger boxes on the course, it works flawlessly when each players runs trough, they get teleported to next objective. Now my game kind of requires them to wait for other players to hit that same trigger before it teleports them to the other objective. I tried playing around with “get current players” node, but unsuccessful. Any help on this would be appreciated.

Thanks!

You can make PlayerCount in GameState(each player add +1 to count when connected) and compare with the count in trigger.

Make counter of how many actors of class (player character) are in trigger box.
If number of those actors is equal number of players they all are in.
for that you can use trace, or just count them on beginOverlap (+1) and endOverlap (-1)

thanks for the tips! i managed to get it working, somewhat. when i play it with 1 player, it works flawlessly, if i run with 2 or more, only first player always gets tp-ed. i also get this error

Error Blueprint Runtime Error: Accessed None trying to read property AuthorityGameMode from function: ‘ExecuteUbergraph_DemoMap’ from node: Get Num Players in graph: EventGraph in object: DemoMap with description: Accessed None trying to read property AuthorityGameMode

error is not there when testing with 1 player.

a30edb55b840a710bbeea8562d9afc262eed05b6.png


edit: OK, apparently i was too sleepy last night, did some re-reading this morning. Error is gone when running test with multiple clients, but only the host is getting teleported. so i guess that’s replication issue on my side.

thanks again!

hey again, I’m still stuck with this :confused:

if anyone could help me point out how to make the whole array of player teleport it would be awesome :confused: these days i was experimenting with Loops and “get overlapped actors” from OnActorBeginOverlap node, and the array of players from game state, but still haven’t managed to teleport whole group from 1 checkpoint to another, either only host goes or no-one. my head is about to explode x( Any help on this would be greatly appreciated!