Forum rules - please read before posting.

AC 1.71.1 api Changes help

Hi Chris,

Running into a few hiccups not knowing what the new way of doing things should be:

Current: KickStarter.player.RepositionToTransform(Current_SpawnPortal_Obj.transform);
Error: 'Player' does not contain a definition for 'RepositionToTransform' and no accessible extension method 'RepositionToTransform' accepting a first argument of type 'Player' could be found (are you missing a using directive or an assembly reference?)

Current:
AC.SceneInfo mySceneInfo = new AC.SceneInfo (ChooseSceneBy.Number, "", lvl);
AC.KickStarter.sceneChanger.ChangeScene (mySceneInfo, true);

Error:
'SceneInfo' does not contain a constructor that takes 3 arguments
Argument 1: cannot convert from 'AC.SceneInfo' to 'int'

Can you please help me with what the new code should look like, I believe you've helped me with these in the past,

Thank you in advance.

Comments

  • For scene change, I did it with one-line now:

    AC.KickStarter.sceneChanger.ChangeScene(scene number, true/false);

    If using Scene Name:
    AC.KickStarter.sceneChanger.ChangeScene(AC.KickStarter.sceneChanger.NameToIndex ("Scene Name"), true/false);

  • Replace:

    KickStarter.player.RepositionToTransform(Current_SpawnPortal_Obj.transform);
    

    with:

    KickStarter.player.Teleport (Current_SpawnPortal_Obj.transform.position);
    KickStarter.player.SetRotation (Current_SpawnPortal_Obj.transform.rotation);
    
  • Thank you fellas

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.