^ seconded, looking to spawn vehicles dynamically and can’t figure out how to move them. are spawned vehicles props and able to use MoveTo?
or, if using a vehicle reference isn’t an option, is there a function to move the spawner device itself?
AFAIK there’s no way to get the reference to the vehicle except once the player is already in it, using MyFortCharacter.GetVehicle[]. However you can also move the spawner itself by making it a child of a prop and then moving the prop.
How do I instantiate a class level property for the fort_vehicle that is returned from GetVehicle[]. I need to keep track of which vehicle the player exited.
I’m getting errors for the following 2 ways:
PlayerVehicle : fort_vehicle = fort_vehicle[]
This type invocation has the ‘decides’ effect, which is not allowed by its context.(3512)
Dynamic cast tuple() to fort_vehicle: argument type tuple() must be a class.
PlayerVehicle : fort_vehicle = fort_vehicle{}
fort_vehicle is not a macro.
if (_PlayerVehicle = FortCharacter.GetVehicle[]):
set PlayerVehicle = option{_PlayerVehicle}
Print("got PlayerVehicle")
Also your PlayerVehicle is a constant and should be a variable in order to be editable :
var PlayerVehicle : ?fort_vehicle = false
But DJEJ22 is right, if your island is not supposed to be played alone only, you need to store the data for every players in your island, hence using the map container.