Showing upgrade costs (using an array)

Attached Files

The following files have been attached to this tutorial:

.capx

upgradecosts.capx

Download now 173.51 KB

Stats

876 visits, 1,357 views

Translations

This tutorial hasn't been translated.

Tools

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

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