# Problem with checkpoint

**URL:** <https://forums.unrealengine.com/t/problem-with-checkpoint/1944722>\
**Category:** Programming & Scripting\
**Tags:** unreal-engine, please-help-me, question, Blueprint\
**Created:** [July 21, 2024, 10:26am UTC](https://forums.unrealengine.com/t/problem-with-checkpoint/1944722 "2024-07-21T10:26:13Z")\
**Posts on this page:** 18\
**Page:** 1

<div class="post-metadata">

**Author:** ![DARKITAYT](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@DARKITAYT](https://forums.unrealengine.com/u/DARKITAYT)\
**Post date:** [July 21, 2024, 10:26am UTC](https://forums.unrealengine.com/t/problem-with-checkpoint/1944722/1 "2024-07-21T10:26:13Z")

</div>

> Hello everyone!!! I am developing a game in which the player has to wear special glasses to travel into the past and back into the future. Let me explain how the mechanics work:

> I have created a copy of the same world at a certain distance. In this second world, I have a capsule (orange one in the drawing) that controls whether teleportation is possible. If teleportation is possible, the player travels into the past and the capsule is sent into the future. If teleportation is not possible, the player stays in the future.
> 
> ![Screenshot 2024-07-21 120752](https://d3kjluh73b9h9o.cloudfront.net/original/4X/f/f/2/ff2d2f22b4d8010381452f30051f570261c1c30a.png)

> My problem is that I created a checkpoint system, but it only works in the future. I cannot understand why it does not find the reference to the checkpoint when the player goes to the past.

> how the checkpoint system work?
> 
> works with two blueprints. The first is a simple box collision that, when the player enters, saves the player’s position in the world to allow respawn at the last checkpoint reached (BP\_RespawnPoint). The second is a trigger that brings the player back, called BP\_FloorDie.
> 
> > BP\_FloorDie
> > 
> > ![Screenshot 2024-07-21 120128](https://d3kjluh73b9h9o.cloudfront.net/original/4X/6/f/3/6f3474299ce14f30adaab0caf8798843102f256e.png)  
> > ![Screenshot 2024-07-21 120138](https://d3kjluh73b9h9o.cloudfront.net/original/4X/d/0/4/d045c8b7b863e0ea5aa062a355ee760a75e021b9.png)  
> > BP\_RespawnPoint  
> > ![Screenshot 2024-07-21 120230](https://d3kjluh73b9h9o.cloudfront.net/original/4X/a/9/b/a9b311ec11bc46eba8235d2e64083aa885fdaa38.png)

---

<div class="post-metadata">

**Author:** ![3dRaven](https://d1ap1mz92jnks1.cloudfront.net/user_avatar/forums.unrealengine.com/3draven/32/906552_2.png) [@3dRaven](https://forums.unrealengine.com/u/3dRaven)\
**Post date:** [July 22, 2024, 8:36am UTC](https://forums.unrealengine.com/t/problem-with-checkpoint/1944722/2 "2024-07-22T08:36:20Z")

</div>

is “LatestRespawnPoint” supposed to be shared by both the future and past checkpoint system?  
If so extract it to a “third party” blueprint and pass it in as a reference so that both checkpoints can share the information.

You could also share the position via a material parameter collection though you can only save scalar or vector parameters there so rotation would need to be converted to a vector based on x (not ideal).

---

<div class="post-metadata">

**Author:** ![DARKITAYT](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@DARKITAYT](https://forums.unrealengine.com/u/DARKITAYT)\
**Post date:** [July 22, 2024, 9:43am UTC](https://forums.unrealengine.com/t/problem-with-checkpoint/1944722/3 "2024-07-22T09:43:47Z")

</div>

> [@3dRaven](#):
>
> is “LatestRespawnPoint” supposed to be shared by both the future and past checkpoint system?

but if the checkpoint system are all in one blueprint, why is there a need to create a third party blueprint to pass the variable?

---

<div class="post-metadata">

**Author:** ![3dRaven](https://d1ap1mz92jnks1.cloudfront.net/user_avatar/forums.unrealengine.com/3draven/32/906552_2.png) [@3dRaven](https://forums.unrealengine.com/u/3dRaven)\
**Post date:** [July 22, 2024, 9:47am UTC](https://forums.unrealengine.com/t/problem-with-checkpoint/1944722/4 "2024-07-22T09:47:01Z")

</div>

Ah ok, yes if both capsules are in the same bp then the variable should be shared.  
Unless they are two separate instances of the the same bp, then each has their own instance of the variable.

Add a breakpoint on the set transform for that parameter (F9) and see if it is triggered during gameplay.

---

<div class="post-metadata">

**Author:** ![DARKITAYT](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@DARKITAYT](https://forums.unrealengine.com/u/DARKITAYT)\
**Post date:** [July 22, 2024, 10:14am UTC](https://forums.unrealengine.com/t/problem-with-checkpoint/1944722/5 "2024-07-22T10:14:09Z")

</div>

> [@3dRaven](#):
>
> Ah ok, yes if both capsules are in the same bp then the variable should be shared.  
> Unless they are two separate instances of the the same bp, then each has their own instance of the variable.
> 
> Add a breakpoint on the set transform for that parameter

The respawn mechanism consists of a single box trigger which saves my position upon entry and then communicates it to the ‘floor die’. Upon death, it resets my position to the saved location. and yes it’s saves the player location when dies even in the past so now the problem is why is teleporting me far away if the location are correct?

---

<div class="post-metadata">

**Author:** ![3dRaven](https://d1ap1mz92jnks1.cloudfront.net/user_avatar/forums.unrealengine.com/3draven/32/906552_2.png) [@3dRaven](https://forums.unrealengine.com/u/3dRaven)\
**Post date:** [July 22, 2024, 10:21am UTC](https://forums.unrealengine.com/t/problem-with-checkpoint/1944722/6 "2024-07-22T10:21:16Z")

</div>

Is “Floor Die” valid when you are setting “Latest Respawn Point”.

Also overlap triggers will not fire if the character starts on them. Perhaps that is the problem.  
You would need to do a box raycast on begin play to set this. The overlap is ignored on construction. You need to exit the component and re-enter for it to register.

Does this volume share the player start coordinates?

If so try this solution

> [@How do I trigger/retrieve overlaps when starting already overlapping?](https://forums.unrealengine.com/t/how-do-i-trigger-retrieve-overlaps-when-starting-already-overlapping/748857/2):
>
> On begin play, you can use the get overlapped actors node on the actor with the collider/the collider itself, making sure the class filter is set to your player characters class, and then check whether that array has anything in it.

---

<div class="post-metadata">

**Author:** ![DARKITAYT](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@DARKITAYT](https://forums.unrealengine.com/u/DARKITAYT)\
**Post date:** [July 22, 2024, 10:51am UTC](https://forums.unrealengine.com/t/problem-with-checkpoint/1944722/7 "2024-07-22T10:51:49Z")

</div>

Yes, when I overlap the trigger box in the past, the ‘floor die’ variable is valid. I’ve noticed that when I go into the past (when it’s black and white), the function that checks for the player doesn’t recognize the player.

Function That check if is the player that overlaped

 ![Screenshot 2024-07-22 125018](https://d3kjluh73b9h9o.cloudfront.net/original/4X/d/5/3/d53bebacf334f9854c4cee43074eecb57c631e2b.png)

---

<div class="post-metadata">

**Author:** ![3dRaven](https://d1ap1mz92jnks1.cloudfront.net/user_avatar/forums.unrealengine.com/3draven/32/906552_2.png) [@3dRaven](https://forums.unrealengine.com/u/3dRaven)\
**Post date:** [July 22, 2024, 10:59am UTC](https://forums.unrealengine.com/t/problem-with-checkpoint/1944722/8 "2024-07-22T10:59:37Z")

</div>

try  
“get player controller” =\> “get controlled pawn”  
I’ve seen on other forum posts, that get player character in some cases behaves strangely.

It would be better to just add an actor tag to your player and then on overlap check if the overlapping actor has the tag for instance “Player”. No need for complex testing / comparing.

---

<div class="post-metadata">

**Author:** ![DARKITAYT](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@DARKITAYT](https://forums.unrealengine.com/u/DARKITAYT)\
**Post date:** [July 22, 2024, 12:58pm UTC](https://forums.unrealengine.com/t/problem-with-checkpoint/1944722/9 "2024-07-22T12:58:37Z")

</div>

It seems the issue might be the lack of a variable to track which bp\_Floor die is being used, as the bp\_Floor die is instantiated twice. How can I obtain a reference to the new floor die each time it’s created?

---

<div class="post-metadata">

**Author:** ![3dRaven](https://d1ap1mz92jnks1.cloudfront.net/user_avatar/forums.unrealengine.com/3draven/32/906552_2.png) [@3dRaven](https://forums.unrealengine.com/u/3dRaven)\
**Post date:** [July 22, 2024, 1:24pm UTC](https://forums.unrealengine.com/t/problem-with-checkpoint/1944722/10 "2024-07-22T13:24:55Z")

</div>

You could to a line cast below the player character or on collision get the reference to the current floor and set it.

---

<div class="post-metadata">

**Author:** ![DARKITAYT](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@DARKITAYT](https://forums.unrealengine.com/u/DARKITAYT)\
**Post date:** [July 22, 2024, 1:51pm UTC](https://forums.unrealengine.com/t/problem-with-checkpoint/1944722/11 "2024-07-22T13:51:14Z")

</div>

> [@3dRaven](#):
>
> the reference to the current floor and set it.

i tried to create a reference in the bp\_resapawn called “LatestFloorDie” and then i set it when i collide with the bp\_floor die but it dosen’t work

---

<div class="post-metadata">

**Author:** ![3dRaven](https://d1ap1mz92jnks1.cloudfront.net/user_avatar/forums.unrealengine.com/3draven/32/906552_2.png) [@3dRaven](https://forums.unrealengine.com/u/3dRaven)\
**Post date:** [July 22, 2024, 1:57pm UTC](https://forums.unrealengine.com/t/problem-with-checkpoint/1944722/12 "2024-07-22T13:57:50Z")

</div>

The floor has to generate collision hit events. Make sure it’s firing first.

---

<div class="post-metadata">

**Author:** ![DARKITAYT](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@DARKITAYT](https://forums.unrealengine.com/u/DARKITAYT)\
**Post date:** [July 22, 2024, 2:02pm UTC](https://forums.unrealengine.com/t/problem-with-checkpoint/1944722/13 "2024-07-22T14:02:43Z")

</div>

The logic is to proceed to the checkpoint, and then, if you touch the ground, you will simply respawn. so it’s diffucult for me get that variable with collision event

---

<div class="post-metadata">

**Author:** ![3dRaven](https://d1ap1mz92jnks1.cloudfront.net/user_avatar/forums.unrealengine.com/3draven/32/906552_2.png) [@3dRaven](https://forums.unrealengine.com/u/3dRaven)\
**Post date:** [July 22, 2024, 2:05pm UTC](https://forums.unrealengine.com/t/problem-with-checkpoint/1944722/14 "2024-07-22T14:05:43Z")

</div>

Then take the burden of responsibility away from the floor. Have the floor contact the blueprint with the checkpoints and keep the variable there. The floor does not need to process the logic, just give the signal to the checkpoint bp.

The checkpoint bp should be holding this information.  
Then the floor instance doesn’t matter.

---

<div class="post-metadata">

**Author:** ![DARKITAYT](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@DARKITAYT](https://forums.unrealengine.com/u/DARKITAYT)\
**Post date:** [July 22, 2024, 2:33pm UTC](https://forums.unrealengine.com/t/problem-with-checkpoint/1944722/15 "2024-07-22T14:33:05Z")

</div>

> [@3dRaven](#):
>
> ignal to the checkpoint bp.

how can i give that signal?

---

<div class="post-metadata">

**Author:** ![3dRaven](https://d1ap1mz92jnks1.cloudfront.net/user_avatar/forums.unrealengine.com/3draven/32/906552_2.png) [@3dRaven](https://forums.unrealengine.com/u/3dRaven)\
**Post date:** [July 22, 2024, 2:36pm UTC](https://forums.unrealengine.com/t/problem-with-checkpoint/1944722/16 "2024-07-22T14:36:50Z")

</div>

Either by reference or you could bind an event dispatcher.

---

<div class="post-metadata">

**Author:** ![DARKITAYT](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@DARKITAYT](https://forums.unrealengine.com/u/DARKITAYT)\
**Post date:** [July 23, 2024, 8:39am UTC](https://forums.unrealengine.com/t/problem-with-checkpoint/1944722/17 "2024-07-23T08:39:26Z")

</div>

so i resolved by using the gamemode to respawn the player with a function that takes the value of the last checkpoint and it worked

---

<div class="post-metadata">

**Author:** ![system](https://d3kjluh73b9h9o.cloudfront.net/original/4X/7/1/3/713c9d3f58553f0de89543d76a8a3a2779dc9fa4.png) [@system](https://forums.unrealengine.com/u/system)\
**Post date:** [August 22, 2024, 8:39am UTC](https://forums.unrealengine.com/t/problem-with-checkpoint/1944722/18 "2024-08-22T08:39:36Z")

</div>

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