On Jump function that already exists in the in the character blueprint , I try to save the position when it jumps. but I dont know how to call it? The second image is of BP of trigger box of water and I want call it there so when my character collide with water it respawns on the location from it just jumped on water.
you’d probably want to save a transform rather than just location
then drag off you player character, cast to your character type and you can get the RespawnPoint variable
Anyhow, is it possible for you to demonstrate it with a BP picture? Thank you so much.
For the first bit you just want this:
For the second bit you just want to create an actor bp, add a collision box (this can also include your water plane, or just place it below your water plane) then on component begin overlap - cast to your characters respawn event
ThankU so much but I am having a little confusion that I want to save it last jump position so shouldn’t I save respawn point here in my jump BP?
If you’re using DeepPixels method which is good, you can call the SaveRespawnPoint function after your button is pressed.
basically drag off pressed (where you have the set transform node and type SaveRespawnPoint, your function will show up.
I also made this function Using ChatGPT kindly let me know if it is correct and and also how to call it? so when my character collide with water it respawns character on the location from it just lastly jumped on water.
no thats extremely wrong haha but before helping with that what happened to the original plan of saving the transform? that seems more efficient
It didn’t work.
it can though, i’d definitely try to learn that first,
you second one is far more complicated, what its trying to do is trace over a loop until it finds land, what you’d need for this is a collision profile for land, the forward direction of the actor to trace backwards, and then a second trace to confirm there is room to spawn at the found location, all of which could potentially fail so you’d need a fail case.
alternatively although also complicated you can try to learn the EQS system
far easier to save the transform on jump, or even every second or so when valid
Maybe the call for save transform is not working if respawn events are working.
you can put breakpoints and/or print strings in your code to see what executes and when
the only potential error is you have no branch before SaveRespawn so you could save in the water for example
Branch In Jump Function right where I am calling saverespawn function?