playMaker

Author Topic: Format for Gameobject in XML for datamaker  (Read 953 times)

asad

  • Playmaker Newbie
  • *
  • Posts: 2
Format for Gameobject in XML for datamaker
« on: March 12, 2020, 06:07:40 PM »
Hello,

I am trying to associate some specific game objects with certain items in my xml. I am familiar with datamaker and I am able to retrieve string, vector, int, etc... store them in hash tables... however when I try to create a value for path to a prefab and store that in a gameobject hash table, all the values are —null—- I’m sure it has something to do with my syntax or formatting for the path to the prefab

Example
<arc>Prefabs/fab name<arc>

I have tried all sorts of paths, including extension, relative to Assets, etc... but I just can’t seem to get it to work. Am I totally on the wrong track here? Is the GameObject node type meant for something else?

Thanks!

jeanfabre

  • Administrator
  • Hero Member
  • *****
  • Posts: 15500
  • Official Playmaker Support
Re: Format for Gameobject in XML for datamaker
« Reply #1 on: March 13, 2020, 02:08:35 AM »
Hi,

you are likele missing something along the process. You need to debug at each step and check where exactly the data gets lost.

- it could be your xml node reference that is wrong ( have you checked that the saved xml has the value?)

- it could be that your value is changed but only in memory and your code retrieving the value check on the non saved xml still

I would isolate this and make a simple scene doing just that, take a object path and save it into a xml node. once you have the process working you can check in your game where it could be wrong.

Let me know how it goes.

Bye,

 Jean

asad

  • Playmaker Newbie
  • *
  • Posts: 2
Re: Format for Gameobject in XML for datamaker
« Reply #2 on: March 13, 2020, 06:16:49 AM »
Thanks Jean. Sorry I should have been more clear, I am creating and loading the XML file, so I am providing the location. I am able to load the xml file and loop through the nodes, save attributes to hash tables, but when I try to specify an attribute as type GameObject, it doesn’t map to any gameobject value in the hashtable, just —null— is displayed. If I change the type to string in my loop and variables, the values all come through.

What syntax should be used when trying to provide a path to a gameobject in the xml?

Thank you for a wonderful product!


jeanfabre

  • Administrator
  • Hero Member
  • *****
  • Posts: 15500
  • Official Playmaker Support
Re: Format for Gameobject in XML for datamaker
« Reply #3 on: March 13, 2020, 08:14:54 AM »
Hi,

 still not fully understanding :)

 can you show me a sample of your xml.

 the sample you showed was not an attribute but a node.

Can you clarify "specify an attribute as type GameObject"

xm is only strings, so your Gameobject type can only be a string that represent the path to that gameobject. Are you ok with that?

instead of storing in a hashtable can you save in an fsmstring and debug that value straight out of the xml action you used?

Bye,

 Jean