So the game im trying to fix up has some techniques where they use ALOT of separate vars for each of there own cooldowns (EX: used_aquajet=0)39 of these vars from what I count which is really stupid so I was wondering what can i do to replace this mess?
can you give me a sample of a what a skill might look like using this im new to using ids so not exactly sure on the proper coding and such
|
You've been here too long to be wasting anyone's time with that second question. The first question was reasonable. The second question is not. Use a string for the ids. Use relative or world time for everything else. I'm not even going to tell you to read the guide. If you don't know what a string is 10 years later, you haven't even read the first page of the guide. Learn or don't learn. Figure it out. |
In response to Zagros5000
|
|
Zagros5000 wrote:
Is it bad to use and save skillcard objects? it's bad to save any objects |
it's bad to save any objects Can you elaborate? Is it bad to use and save skillcard objects? Depends. Do you plan on changing the structure of the skills later? You probably don't need a skill object per player. A single global list containing one copy of all skills in the game and a set of ids corresponding to what skills a player has access to are probably more than enough information to be saving for skill usage in an unlock-based game. These days, I'm leaning away from saving atoms because they are just too data intensive and too prone to breaking changes. |
Ooh I can see the advantage of saving to a global list and giving players access instead of per player saving
|
In response to Ishuri
|
|
Ishuri wrote:
Zagros5000 wrote: Isn't it only bad to save objects if you're foolishly saving the icon itself and other data that you could easily load back in later? In short, don't have redundant data. Only save data you can't possibly get back (experience, location, a CHANGED name, etc.). |
Boom. Cooldowns. One variable. Just use a string for ids. List association is awesome.