Showing upgrade costs (using an array)

2

Attached Files

The following files have been attached to this tutorial:

.capx

upgradecosts.capx

Download now 173.51 KB

Stats

1,748 visits, 2,433 views

Tools

Translations

This tutorial hasn't been translated.

License

This tutorial is licensed under CC BY 4.0. Please refer to the license text if you wish to reuse, share or remix the content contained within this tutorial.

Published on 23 Jul, 2016. Last updated 19 Feb, 2019

In this example Im showing you a "more elegant" way to display upgrade costs, for example, for buildings.

Here we got a lumbermill and goldmine, starting on "level 0" to a maximum of "level 4" each.

The *.capx is fully commented.

Additional ressources, needed for this example:

Arrays

If you dont know much about them (or how they work), first take a look at: scirra.com/manual/108/array . If you need to know more, simply google "how do 2D arrays work" in your language ;)

Functions

scirra.com/manual/149/function is a good source, especially (on the bottom) the "Call" and "ReturnValue" expression is needed here.

If there are any questions, feel free to ask.

.CAPX

upgradecosts.capx

Download now 173.51 KB
  • 0 Comments

Want to leave a comment? Login or Register an account!