0
Answered

Loading a scene whilst mounted on a horse

Swainy 3 months ago in Game Creator updated by Marti (Lead Developer) 3 months ago 1

What's the best way to load a new scene whilst mounted? It seems that when my player is mounted and the new scene loads, the player loads just fine but the mount doesn't come with him.

Would it be a case of an On Start tigger checking whether the player entered the scene mounted and then execute actions to mount the player during the scene load, hidden by transition/ load sceen?

Unity version:
2019.2.21f1
Game Creator version:
1.1.8
GOOD, I'M SATISFIED
Satisfaction mark by Swainy 3 months ago
Answered

Yes, that would be the way. When you load a scene, only the thinks marked as "savable" are transferred. Parenting an object (or mounting in general) doesn't get transferred. I'd recommend using a On Start Trigger (as you say) with a condition of a global variable "is-player-mounted". If the value is True, then mount the character. Do nothing otherwise.

By doing so, you can change a variable when the character mounts/dismounts and it will be applied to follow-up scene loads.