Forum rules - please read before posting.

Asset File List Parameters not Set

Hey,

I'm currently working on an inspect mode in my game, where you can pick up stuff from the world and inspect them in front of your camera in 3D with turning and using buttons on that object, etc.
I've got that running so far. Only the reset function which I made an AssetFile-AssetList isn't working properly. I'm using one asset list to activate the action from a menu. Since these can't take other parameters than ints I'm calling another asset file from in there which parameters are set on activating the inspect mode on the item.
1. You click the item.
2. It gets parented to your camera and sets the parameters of the reset function to its own parameters, so both of them know they're working with the same object.
3. you reset the inspected item by clicking the x-button

It works just fine for one item, but as soon as I pick up the next one the parameters aren't set to the new variables. I can either leave their old values there or delete the parameters. But the new one's are just never set.

I just can't find my mistake.

Thanks for your help.

Comments

  • edited February 2018
    Welcome to the community, @Moehrli.

    Which versions of both AC and Unity are you using, and how are you setting the parameters?  Through code, or either the "ActionList: Run" or "ActionList: Set parameter" Actions?

    Would you be abe to post some screenshots that illustrate the issue?  I'm afraid there isn't enough detail about how you're going about this - and I'll need to be able to recreate the problem in order to help.

    As it sounds like you're using this for quite a complex operation, see if you can reproduce it with a much more simple chain of Actions - for example, setting a string parameter that the player can say in their speech text (using the [param:X] token).  If you can share details or steps that can be followed to get the issue to occur, that would be great.
  • Thank you for your response. I actually managed to wrap my head around the problem I had, even though I'm pretty sure it shouldn't have been happening in the first place. I would declare it as a unity bug. The parameters where set exactly right. My problem was, that the GameObjects I used for parenting my inspectable objects where duplicates of one another. Since I destroyed them as soon as the object wasn't inspectable anymore (puzzle solved) unity thought I destroyed all of them...I still saw all other instances in the editor, but the scripts didn't seem to find them anymore.

    Sadly I ended up finding out about this error by implementing my own Inspectable class and coded a whole system behind that operation which wouldn't have been necessary if only I understood the error ^^'

    But never mind. I learned a lot about custom Actions and custom scripts for AC in the process, so it was worth it after all.

    Thanks for your help anyway.
  • No problem.  If you've written anything custom that you feel others may benefit from and don't mind sharing, please feel free to post on the community wiki!
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.