How to use one SpriteFont and change it dynamically

1

Attached Files

The following files have been attached to this tutorial:

.capx

tutofontid.capx

Download now 177.25 KB

Stats

2,327 visits, 9,594 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 3 Feb, 2017. Last updated 19 Feb, 2019

We often need to make changes on one instance of Sprite, SpriteFont, Text...

We have for this the System condition: Pick by comparison.

To select an instance of a SpriteFont and change his text:

- Add Instance Variable "varId" to your object SpriteFont

- Give an ID like "myText"

- Pick by comparison: SpriteFont.varId = "myText"

- Modify the text

That's all !

Demo: http://myslot.2vib.com/tutoFontId/

You can find this tip in: https://www.scirra.com/store/games-with-source/my-jukebox-slot-machine-3196

.CAPX

tutofontid.capx

Download now 177.25 KB
  • 0 Comments

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