# Need help with making a game(how to collect points)

**URL:** <https://forum.kirupa.com/t/need-help-with-making-a-game-how-to-collect-points/256830>\
**Category:** Uncategorized\
**Created:** [April 7, 2008, 7:36pm UTC](https://forum.kirupa.com/t/need-help-with-making-a-game-how-to-collect-points/256830 "2008-04-07T19:36:47Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![boburmum1](https://avatars.discourse-cdn.com/v4/letter/b/edb3f5/32.png) [@boburmum1](https://forum.kirupa.com/u/boburmum1)\
**Post date:** [April 7, 2008, 7:36pm UTC](https://forum.kirupa.com/t/need-help-with-making-a-game-how-to-collect-points/256830/1 "2008-04-07T19:36:47Z")

</div>

i need help. i made a wall movie clip with the instance name wall, and a ball with the instance name ball. and a c oin with the instance name coin. but when i type in the instance name wall for the wall movie clip, the score goes down by -2 and it hasn’t even hit the wall. could someone plz help, and when the ball goes over the coin, nothing happens. could someone plz give me the AS, i had to switch off my laptop with the flash 8 file on. its annoying. i got the AS for the char but it goes out the screen and u can’t find it afterwards. the coin won’t work either. it’s so annoying. i just switched my laptop on and i gonna find out the AS for the char. here it is.I am using Flash 8.0 and AS 2.0

[FONT=Verdana][COLOR=black]  
[LIST=1]  
[_][FONT=Verdana]onClipEvent[/FONT][SIZE=3][FONT=Times New Roman] (load)[/FONT][/SIZE]  
[_][FONT=Verdana]yspeed = 0;[/FONT]  
[_][FONT=Verdana]xspeed = 0;[/FONT]  
[_][FONT=Verdana]wind = 0.00;[/FONT]  
[_][FONT=Verdana]power = 0.65;[/FONT]  
[_][FONT=Verdana]gravity = 0.1;[/FONT]  
[_][FONT=Verdana]upconstant = 0.75;[/FONT]  
[_][FONT=Verdana]friction = 0.99;[/FONT]  
[_][FONT=Verdana]}[/FONT]  
[_][FONT=Verdana]onClipEvent (enterFrame) {[/FONT]  
[_][FONT=Verdana]if (Key.isDown(Key.LEFT)) {[/FONT]  
[_][FONT=Verdana]xspeed = xspeed-power;[/FONT]  
[_][FONT=Verdana]}[/FONT]  
[_][FONT=Verdana]if (Key.isDown(Key.RIGHT)) {[/FONT]  
[_][FONT=Verdana]xspeed = xspeed+power;[/FONT]  
[_][FONT=Verdana]}[/FONT]  
[_][FONT=Verdana]if (Key.isDown(Key.UP)) {[/FONT]  
[_][FONT=Verdana]yspeed = yspeed-power_upconstant;[/FONT]  
[_][FONT=Verdana]}[/FONT]  
[_][FONT=Verdana]if (Key.isDown(Key.DOWN)) {[/FONT]  
[_][FONT=Verdana]yspeed = yspeed+power_upconstant;[/FONT]  
[_][FONT=Verdana]}[/FONT]  
[_][FONT=Verdana]xspeed = (xspeed+wind)friction;[/FONT]  
[][FONT=Verdana]yspeed = yspeed+gravity;[/FONT]  
[_][FONT=Verdana]\_y = \_y+yspeed;[/FONT]  
[_][FONT=Verdana]\_x = \_x+xspeed;[/FONT]  
[_][FONT=Verdana]\_rotation = \_rotation+xspeed;[/FONT]  
[_][FONT=Verdana]if (\_root.wall.hitTest(\_x, \_y, **true** )) {[/FONT]  
[_][FONT=Verdana]xspeed = 0;[/FONT]  
[_][FONT=Verdana]yspeed = 0;[/FONT]  
[_][FONT=Verdana]\_x = 120;[/FONT]  
[_][FONT=Verdana]\_y = 120;[/FONT]  
[_][FONT=Verdana]\_root.score -=2;[/FONT]  
[_][FONT=Verdana]}[/FONT]  
[_][FONT=Verdana]if (\_root.coin.hitTest(this.hero\_hit)) {[/FONT]  
[_][FONT=Verdana]\_root.coin.\_x = Math.random()400+50;[/FONT]  
[][FONT=Verdana]\_root.score ++;[/FONT]  
[_][FONT=Verdana]}[/FONT]  
[\*][FONT=Verdana]} [/FONT][/LIST][/COLOR][/FONT]  
[FONT=Verdana][COLOR=black]that is the exact actionscript i typed. could anyone tell me what is wrong. and if there is actionscript for the coin plz could someone tell me. or even the wall. plz help me, i am actually really new to AS2.0. i am using Flash 8.[/COLOR][/FONT][/font]
