How can I make it so that, upon death; I can spawn a Prefab Object on the player's death position that will NOT disappear upon loading another scene? (Let's call it a tombstone.)
In this case, when the player dies, they are not taken to the game over screen. They are merely teleported and revived at the nearest checkpoint, often in a different scene.
Then when they return back to the scene where they died, the 'Tombstone' will still be present in the place where they died.
Is this possible within ORK? Is there a script that I can write and add to the prefab to attain this behavior?
---------
Edit: I believe I've actually found a way to do this, involving battle events (Save player position as vector3 variable and current Scene as variable upon death), and global events (if scene is correct, then upon scene load: spawn Tombstone prefab at Player's Death Position variable.)
Unfortunately, something has stopped me dead in my tracks: I think Transform to Variable appears to be broken, as I can't get it to display a position for anything other than 0,0,0, no matter what object I use it for. Can anyone else confirm, or am I doing it wrong?
Edit2: Saving the scene name as a variable and then trying to display it in a dialogue for testing purposes is also failing to show up. I'll toss GiL an email with a test event, just to make sure I'm not going crazy.
Got the email, should work like that but it doesn't :) Will look into it!
Edit: Transform to Variable has a bug, will be fixed in the next update. Regarding the scene name, you've used the scene name as the variable's key and not it's value :)
Post edited by gamingislove on
Please consider rating/reviewing my products on the Asset Store (hopefully positively), as that helps tremendously with getting found. If you're enjoying my products, updates and support, please consider supporting me on patreon.com!
Will look into it!
Edit:
Transform to Variable has a bug, will be fixed in the next update.
Regarding the scene name, you've used the scene name as the variable's key and not it's value :)
If you're enjoying my products, updates and support, please consider supporting me on patreon.com!
---------------------------------------
Personal Twitter: https://twitter.com/AMO_Crate
I make RFI! https://twitter.com/NootboxGames