SK1SK1
edited September 10 in General Discussion
hi, i want to achieve the "Final Fantasy" airship function, after doing so, there is a problem:
1. Can not use the conditions of control of the beginning of the player was born, when the airship set as a player,
when switching scenes will automatically be born in the birth of a default player.

2. If you use another airplane, add an automatic event to destroy the player, but when the airship landing, the player can not be born.
bbvdd.com/d/20170910235947ewn.png
bbvdd.com/d/201709110000123pz.png
bbvdd.com/d/20170910235704z5r.png
Post edited by SK1 on
  • If the player is changed into an airship (i.e. the airship isn't placed somewhere in the scene to enter), you can use Conditional Prefabs on the combatant to change the normal prefab for the airship prefab (and back) by e.g. just setting a global variable that's used as condition.

    If you're using an airship to enter/exit, it's best to have exchanging the player for the airship on other maps through either an autostart event or a global event (using the Scene type).

    For landing, you can use a Spawn Player node to spawn the player at the position of the airship before destroying it.
  • @gamingislove,Thank you have solved the problem of spacecraft, but now there have been new problems.

    When you switch to a spacecraft, the spacecraft rises to a certain height, because gravity re-dropped to the ground, when I use a custom controller, add a controller to the player and the spacecraft, one with gravity, one without gravity, When controlling the player, the spacecraft does move with the player at the same time, when the arrow keys, the spacecraft and the player will move at the same time. Two objects can not be individually controlled separately.
  • There is also a problem: when I control the spacecraft in the map to move to a new location, when the switch to the player into a new scene, and then return to the spacecraft scene, the spacecraft will appear in the starting position, rather than docked Location, can not save the spacecraft after the scene location.
  • For your second question, every time after you finished docking the spacecraft, add a transform to variable node to your docking event. This will save the position of the spacecraft into a vector3 variable. Let's call this variable "docking". Add an new auto start event to your spacecraft. Create a new event. In this event, add a change position node. Inside this node, move the spacecraft to the variable " docking ".
    Save, and add it to the auto event. Now the position of your spacecraft should be save every time you change scene and come back.
  • If player and spacecraft are there at the same time and both have control components, you'll need to disable or remove the component on one of them to prevent both from being controlled at the same time.
Sign In or Register to comment.