Question:

Need help with my actionscript 2.0 script its working but var is messed

by  |  earlier

0 LIKES UnLike

//so guys this is my script what happens is everything works fine and all but when i collect the object my bar goes up, ie first coin i collect bar goes to 1 then the second coin i collect, it goes to 11, then 111 and soforth. my question is.. how can i make it go from 1 2 3 4 5 ect

onClipEvent(enterFrame) {

if(_root.char.hitTest(this)) {

_root.money =1

unloadMovie(this);

}

}

 Tags:

   Report

2 ANSWERS


  1. I don't program using this language but I think what you're looking for is instead of making "_root.money" equals to "1", you suppose to increments by 1.

    Example (using a different language);

    $money = 1

    $money = $money + 1


  2. Try this:

    onClipEvent(enterFrame) {

    if(_root.char.hitTest(this)) {

    _root.money +=1

    unloadMovie(this);

    }

    }

Question Stats

Latest activity: earlier.
This question has 2 answers.

BECOME A GUIDE

Share your knowledge and help people by answering questions.