How do I make something like a properties file and load it?

Get help using Construct 2

Post » Mon Jan 11, 2016 8:04 pm

Hi,
I would like to make something like a properties file for each item in my game. So a file for a sword for example should look like this:

ID=1
name=sword
damage=75
...


The game should then be able to for example find the value of "ID" in the file.
Is there a function like this already in construct 2 or if not can I somehow find the different values?
Thanks! :)
Image
B
5
S
3
Posts: 193
Reputation: 1,063

Post » Mon Jan 11, 2016 8:15 pm

you could use the xml-object

https://www.scirra.com/manual/139/xml

or just put the data in an array or dictionary..
I told my dentist I had trouble with my teeth and asked her to fix it without looking in my mouth..
B
54
S
16
G
8
Posts: 6,160
Reputation: 19,775

Post » Mon Jan 11, 2016 9:04 pm

Thanks @LittleStain,
So what do i have to do if I want to request the ID or something and how do I write that to the text file. I actually already tried the xml object but I don't really know how to use it.
Thanks again!
Image
B
5
S
3
Posts: 193
Reputation: 1,063

Post » Tue Jan 12, 2016 5:44 pm

Any help about the xml plugin? How do I make such a properties file with it?
Thanks! :)
Image
B
5
S
3
Posts: 193
Reputation: 1,063


Return to How do I....?

Who is online

Users browsing this forum: brunopalermo, David181, fens, Yahoo [Bot] and 10 guests