How do I make this character system working?

Get help using Construct 2

Post » Wed Jun 24, 2015 7:30 am

I'm making a character system, that read his infos in XML files;
How can I load data from XML accourding to touched button (in his IDs)? And from loaded XMLs, get the nickname of char and put into "Window Text"?
The project's CAPX. Thanks in advance for who can help. :D
Liked something I say?
Tip. My Bitcoin address: 1PLaeKmXQ8vEdGGJqXMq3KyB8hxeddxeSv
B
26
S
8
G
4
Posts: 336
Reputation: 4,050

Post » Wed Jun 24, 2015 8:24 am

https://www.scirra.com/tutorials/807/how-to-read-an-xml-and-make-your-game-talk

But its much easier, faster and needs less storage, if you work with JSON!
Sorry for my bad english, but I really do my best! And use and check with Google Translator.
B
11
S
4
G
1
Posts: 158
Reputation: 1,328

Post » Wed Jun 24, 2015 3:20 pm

@deathangel1479, how do I make this shiny-working with JSON in my CAPX? Too, I need to set animation of two first icons accourding to name of character in JSON.
Liked something I say?
Tip. My Bitcoin address: 1PLaeKmXQ8vEdGGJqXMq3KyB8hxeddxeSv
B
26
S
8
G
4
Posts: 336
Reputation: 4,050

Post » Wed Jun 24, 2015 4:43 pm

Lets crack a nut with a sledgehammer.
Project
Plugin
Code: Select all
[
  {
    "genotype": {
      "name": "Car",
      "start_hp": "",
      "start_attack": "",
      "start_defence": "",
      "max_hp": "",
      "max_attack": "",
      "max_defence": "",
      "start_capture_rate": "",
      "max_capture_rate": "",
      "max_exp": "",
      "metamorphose_rate": "16",
      "base_level": "5",
      "types": "",
      "gender": "",
      "dna_gender": "",
      "dna_specie": "",
      "dna_variety": "",
      "max_strength": ""
    },
    "fenotype": {
      "nickname": "Car",
      "": ""
    },
    "status": {
      "hp": "",
      "pp": "",
      "held_item": "",
      "strenght": ""
    }
  },
  {
    "genotype": {
      "name": "Airplane",
      "start_hp": "",
      "start_attack": "",
      "start_defence": "",
      "max_hp": "",
      "max_attack": "",
      "max_defence": "",
      "start_capture_rate": "",
      "max_capture_rate": "",
      "max_exp": "",
      "metamorphose_rate": "18",
      "base_level": "5",
      "types": "",
      "gender": "",
      "dna_gender": "",
      "dna_specie": "",
      "dna_variety": "",
      "max_strength": ""
    },
    "fenotype": {
      "nickname": "Airplane",
      "": ""
    },
    "status": {
      "hp": "",
      "pp": "",
      "held_item": "",
      "strenght": ""
    }
  }
]

Great JSON Site

I would make it even a little bit different, but that's enough for now.
Sorry for my bad english, but I really do my best! And use and check with Google Translator.
B
11
S
4
G
1
Posts: 158
Reputation: 1,328


Return to How do I....?

Who is online

Users browsing this forum: No registered users and 21 guests