mardi 11 avril 2017

A "I do not know what is wrong" Issue in flash. (SHOULD BE EASY)

Please take note that you can edit this if there is something wrong with the question

There is something wrong with the code Have I learned something wrong? Or is it correct and the problem was in another block?

Here is my code:

if (runner.hitTestObject(healthbottle1)){
        healthbottle1.y=-23;
        healthno.text=health;
        health++
    }

The result for some reason is that it subtracts the health number by 1 and not add up when hits healthbottle1... oh and its Y coordinate moved to -23.

---------------TAKE NOTE THAT THE SCRIPT ISN'T THE WHOLE CODE I ADDED-----------

Aucun commentaire:

Enregistrer un commentaire