PlayMaker Help & Tips > PlayMaker Help
Call events from text file[SOLVED]
LogLady:
Is it possible to call events from tags inside a text file?
Something like this:
<load="image.jpg"><set_position=400*400*1>
It would trigger a event to find and load this "image.jpg" and then set its position to x=400 y=400 z=1
Thanks!
jeanfabre:
Hi,
yes, you should use DataMaker for this, it's a full blown xml reader and writer for PlayMaker.
https://hutonggames.fogbugz.com/f/page?W1133
however, you should properly define your structure and comply with Xml standard, it will be a lot more flexible and powerful down the road than an hybrid definition.
so something like that is better ( there are tons of variants of course) :
<Sequence>
<load type='Sprite' id='My Image'>image.jpg</load>
<SetPosition space='world'>
<Target>My Image</Target>
<Position>400,400,1</Position>
</SetPosition>
</Sequence>
If you don't go with an xml based text content, then you'll have to parse your tags manually, and that's a lot more painful indeed... and you'll need to learn Regex, we have some actions on the Ecosystem to work with regex like "StringRegexMatch"
something like that : https://regex101.com/r/GykLuX/1
Bye,
Jean
LogLady:
It is a whole new world! Thanks for the reply Jean!
LogLady:
After instaling the DataMaker using the Ecosystem this error appeared:
"Assets/PlayMaker ArrayMaker/Addons/Custom/Table/Actions/ArrayTableContains.cs(116,36): error CS1061: Type `ArrayListTable' does not contain a definition for `GetColumnHeader' and no extension method `GetColumnHeader' of type `ArrayListTable' could be found. Are you missing an assembly reference?"
I'm using Windows10 and Unity 2017.4.12f1
jeanfabre:
Hi,
Right, I updated DataMaker to feature the latest ArrayMaker, should be good now.
Bye,
Jean
Navigation
[0] Message Index
[#] Next page
Go to full version