Forum rules - please read before posting.

ActionPlayerTeleportInactive.CreateNew forgot to initialise some variables?

When creating programmatically an ActionPlayerTeleportInactive, the CreateNew function is as follows:

        public static ActionPlayerTeleportInactive CreateNew (int playerID, PlayerStart newPlayerStart, _Camera newCamera = null)
        {
            ActionPlayerTeleportInactive newAction = CreateNew<ActionPlayerTeleportInactive> ();
            newAction.playerID = playerID;
            newAction.newTransform = newPlayerStart;
            return newAction;
        }

It took me a while till I found that this parameter was wrongly set:

action.teleportPlayerStartMethod = TeleportPlayerStartMethod.EnteredHere ;

I think it should be in CreateNew function.

Comments

Sign In or Register to comment.

Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!

Welcome to the official forum for Adventure Creator.