PDA

View Full Version : Simple but confused.



gmftballa
April 10th, 2005, 09:55 PM
Ok well i have a simple money script [for my game] and i want to say, ok when i walk over a coin, i want it to add $5 to the total amount of money, but the problem is, is that my code doesnt work,
in the frame actions i have:

money = 0;
and in the hitTest for the coin i have:

if (_root.dude.hitTest(_root.coin) {
_root.money +1
}

If im doing something wrong, can someone point it out, it would be much appreciated.
Thank You In Advance. :)

rhamej
April 10th, 2005, 10:16 PM
Rather crude, but you will get the idea :)

nathan99
April 10th, 2005, 10:36 PM
if (_root.dude.hitTest(_root.coin){

_root.money +1

}



if that is the code this would be ur problem;




if (_root.dude.hitTest(_root.coin)) {

_root.money +1;

}

gmftballa
April 11th, 2005, 12:20 PM
Rather crude, but you will get the idea :)
thank you, i needed the:

_root.money +=5;
thanks for your help, both of you :D

rhamej
April 11th, 2005, 02:32 PM
np prob :thumb: