You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
ghoulslash edited this page Apr 29, 2021
·
1 revision
Spawn Invisible Player
credits to ghoulslash
This feature allows us to spawn the player object as invisible after a warp, which can be useful for cutscenes, etc. Note that the camera will still be centered on the player.
Define a flag
We'll use a flag to toggle whether or not we want to spawn the player as an invisible object. Open up include/constants/flags.h and either add or replace a flag with the following: FLAG_SPAWN_INVISIBLE
Make the flag functional
Open src/field_player_avatar.c and find the function InitPlayerAvatar. Add the following to the end of the function:
if (FlagGet(FLAG_SPAWN_INVISIBLE))
{
FlagClear(FLAG_SPAWN_INVISIBLE);
objectEvent->invisible= TRUE;
}