Hello fellow AC toddlers,
I would like my character to throw an inventory item to a certain spot. I think I have it all correctly set up, but when I run the game and initiate the interaction that triggers the throwing, I get the following error:
Setting the parent of a transform which resides in a prefab is disabled to prevent data corruption.
UnityEngine.Transform:set_parent(Transform)
AnimEngine_Legacy:ActionCharHoldRun(ActionCharHold) (at Assets/AdventureCreator/Scripts/Animation/AnimEngine_Legacy.cs:341)
ActionCharHold:Run() (at Assets/AdventureCreator/Scripts/Actions/ActionCharHold.cs:78)
AC.<RunAction>c__Iterator1:MoveNext() (at Assets/AdventureCreator/Scripts/ActionList/ActionList.cs:140)
UnityEngine.MonoBehaviour:StartCoroutine(String, Object)
AC.ActionList:ProcessAction(Int32) (at Assets/AdventureCreator/Scripts/ActionList/ActionList.cs:126)
AC.ActionList:BeginActionList(Int32) (at Assets/AdventureCreator/Scripts/ActionList/ActionList.cs:104)
AC.ActionList:Interact() (at Assets/AdventureCreator/Scripts/ActionList/ActionList.cs:70)
AC.<UseObject>c__Iterator3:MoveNext() (at Assets/AdventureCreator/Scripts/Controls/PlayerInteraction.cs:770)
I have configured four actions:
- Character:Hold Object
- Object:Visibility
- Engine:Pause (2s)
- Object:Transform
The error message is quite clear and must originate from the first action. Unfortunately that doesn't help me to figure out what to do instead.
What can I do to be able to throw that object?
Thanks for any pointers ...
orrence.
Comments
I've had problems with that new system (a torch that changes it's constant ID every now and then) so I recommend the first solution, but feel free to try either. Or let me know if you find a better solution!
@skitt2501: ConstantID numbers should NEVER reset! Please let me know how/why it changed if you can. Be aware that as of 1.29 you can set a number manually, but I'd hope you shouldn't have to.
I'm not exactly sure what caused the problem, as I've since completely changed it so that each scene has its own torch scene object so that this issue doesn't happen... But if I had to guess, I would say there is an issue with having the torch being moved through multiple scenes versus the torch scene object in the first scene.