How do I make it so once the player has left the biplane, The player instantly gets eliminated
Hey @UEFN_LOVER! How are you?
To kill the player once they leaves the Biplane you will need to implement some Verse code.
Basically, you need to subscribe to the Biplane event “AgentExitsVehicleEvent”, which returns the Agent who left it and lets you apply damage to it.
using { /Fortnite.com/Devices }
using { /Verse.org/Simulation }
using { /UnrealEngine.com/Temporary/Diagnostics }
# Don't forget to include this, so you can access to the Fort Character attributes and functions
using { /Fortnite.com/Characters }
BiplaneManager := class(creative_device):
@editable # Variable to store the Biplane (you can make an array if you have more than one)
MyBiplane : vehicle_spawner_biplane_device = vehicle_spawner_biplane_device{}
OnBegin<override>()<suspends>:void=
# Subscribe to the Biplane "Exits Vehicle" event and call the function to kill the player
MyBiplane.AgentExitsVehicleEvent.Subscribe(KillPlayer)
# This is the function to kill the player
KillPlayer(Agent:agent):void=
#This gets the Fort Character from the Agent that is leaving the Biplane
if(Player := Agent.GetFortCharacter[]):
#This applies damage to that Fort Character
Player.Damage(99999.0)
Please let me know if this works for you!
I pasted in the code and it shows no errors but when i build the code and i go in the game nothing happens to the player once he leaves the plane.
Those errors do not affect your game, you will need to place the verse device from the content drawer to your world and select the plane spawner device
alr il try that
Hello again!
Sorry I didn’t provide a more detailed explanation for that part!
Here I go:
Once you have created the new Verse Device, you will see it in you project folder.
If you drag and drop it on you island, you will see a device like this one:
If you click on that device, you can assign a Biplane to it:
And that’s everything you need to make it work!
its all good now thanks