Spawn Manager - golden-coconut-studio/TikiAdventuresWiki GitHub Wiki

  • This actor has to exist in the world and is the responsible of managing the Tikis spawn points. It is able to return an FVector which has the new spawn location. Return ZeroVector if there was a mistake finding the best spawn location.

  • The function you can use is "Respawn", and it is BlueprintCallable so you can call it from blueprint. Remember it returns an FVector with spawn location, so you will have to "SetActorLocation" or something like that.

  • Respawn:

    1. Gets all active and visited spawn points.
    2. Knowing the name, it looks for the last spawn visited by that tiki.
    3. Returns the location of that Spawn.
    
  • Example:

Example

This example shows how you should use the system. When entering a collider (in this case, a collider that "kills you"), we need to get the SpawnManager and the name of the Tiki that has overlapped. Then we call the "Respawn" function (with the SpawnManager object as Target). Finally, we need to set the overlapped actor location to the new one we got from "Respawn".