Showing upgrade costs (using an array)

2
  • 11 favourites

Attached Files

The following files have been attached to this tutorial:

.capx

upgradecosts.capx

Download now 173.51 KB

Stats

1,635 visits, 2,293 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.

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!