using variable in dynamic text?
Im trying out adobe animate for school and until now ive been following a cool rpg game tutorial. but the tutorial ended quicky and now im left on my own browsing the internet. i wanted to add a little star collector feature but the tutorial i found is for flash and i dont know how to use it.
their code is pretty much
money = 0;
onClipEvent (enterFrame) {
if (_root.move_mc.hitTest (this)) {
_root.money++;
this._x = -50;
this._y = -50;
}
}
and i changed it to
var star:Number = 0;
if(linkMc.hitBoxMc.hitTestObject(overworldMc.starM c1))
{
star += 1;
overworldMc.starMc1.alpha = 0;
}
and it works but now i need to figure out a way to set up a text n the corner telling you how many stars you have.
[link to their image] (https://www.kirupa.com/developer/act...ings.JPG)((((i cant post images yet as i dont have enough points))))
but my version of adobe animate doesnt seem to have the var option! so how do i set up the text?