How do I store character attributes wisely?

Get help using Construct 2

Post » Tue Mar 01, 2016 5:52 pm

My goal:
Have all sorts of character attributes (strenght, intelligence etc.) stored which can be increased by leveling up your character.

General conditions:
I want to have it set up the best way possible, without bugs / lags and without hundred hours of work if something is missing out.

My question:
I thought about using Arrays (maybe CSV plugin?), general variables, instance variables, dictionaries etc.
I tried different things, but still can't find out how to do it the best way.

Sorry for my bad english.
B
10
S
4
Posts: 34
Reputation: 874

Post » Tue Mar 01, 2016 6:19 pm

The simplest way is to use instance variables.

Arrays are also a good choice and could be more flexible and easier to work with when importing/exporting, but also more complex and prone to logic bugs.

There are a lot of ways to do it, as you mentioned with arrays, general variables, instance variables, and dictionaries, and it really depends on what makes the most sense for you and what you are most comfortable with. This will result in the least problems down the line. Keep it as simple as possible while being able to do everything you need to do.
Mistakes were made.
B
53
S
27
G
114
Posts: 1,699
Reputation: 64,446

Post » Wed Mar 02, 2016 12:36 am

Im fairly new to using construct but have made a couple simple games that require storing attributes and I found using instance variables is the easiest and most reliable way for me.
B
9
S
3
Posts: 58
Reputation: 805

Post » Wed Mar 02, 2016 5:16 pm

Dictionaries or the rex_hash works also.
plugin-hash-table_t65765
https://www.ravenheart.ca/home
I don't check the forums much anymore, but I will receive an email for PMs.

"Someone once told me I bite off more than I can chew...

I told them I would rather choke on greatness than nibble on mediocrity."
B
23
S
6
G
1
Posts: 1,419
Reputation: 4,857


Return to How do I....?

Who is online

Users browsing this forum: Yahoo [Bot] and 29 guests