| Home | Tutorials | Forums | Articles | Blogs | Movies | Library | Employment | Press | Buy templates |
|
|
#1 |
|
Registered User
|
THE PROBLEM IS I HAVNT GOT A CLUE WHERE TO START IVE TRIED INCORPERATING SCRIPTS FROM OTHER EXAMPLES E.T.C BUT I CANT SEEM TO GET THEM TO WORK
IF SOMEONE COULD POINT ME IN THE RIGHT DIRECTION IM SURE I COULD FIGURE OUT THE REST. IM NOT A VERY GOOD ACTIONSCRIPTER I SEEM TO SPEND MY TIME ON BETWEEN FLASH, SWIFT 3D AND 3DSMAX SIMPLY FOR WEBSITES AND PRESENTATIONS. IF ANYONE COULD HELP IT WOULD BE GREAT. BECAUSE I THINK ONCE I GET THESE POINTS DONE IT HAS THE POTENTIAL FOR BEING A FUNNY GAME. ALL THE BEST CHARLIE DAVEY IF YOU WOULD LIKE TO SEE WHAT I HAVE DONE ITS http://www.texicare.co.uk/test/game/game.html //MAIN CODE FOR THE TRUCK AND THE MOVIE onClipEvent (load) { moveSpeed = 10; _root.laser._visible = false; laserCounter = 1; scrollx = _root.mainGround.ground._width/3; scrollStart = false; maxLasers = 1; depthCounter = 3; shotSound = new Sound(this); shotSound.attachSound("moo"); soundStartabe = true; } onClipEvent (enterFrame) { if (Key.isDown(Key.CONTROL) and (laserCounter<=maxLasers)) { laserCounter++; shotsound.start(); _root.laser.duplicateMovieClip("laser"+depthCounte r, depthCounter); _root["laser"+depthCounter]._visible = true; depthCounter++; if (depthCounter>maxLasers) { depthCounter = 1; } } if (Key.isDown(Key.RIGHT)) { if (this._x<scrollx) { this._x += moveSpeed; } else { scrollStart = true; } } else if (Key.isDown(Key.LEFT)and this._x>0) { this._x -= moveSpeed; } if (Key.isDown(Key.DOWN)and this._y<300) { this._y += moveSpeed; } else if (Key.isDown(Key.UP)and this._y>100) { this._y -= moveSpeed; } } onClipEvent (keyUp) { if (Key.getCode() == Key.RIGHT) { scrollStart = false; } } //CODE FOR THE ENEMY onClipEvent (load) { function reset() { this._x = 750; this._y = random(200)+100; enemySpeed = random(4)+1; this.gotoAndStop(1); } reset(); } onClipEvent (enterFrame) { if (_root.spaceship.scrollStart) { this._x -= enemySpeed+_root.mainGround.groundSpeed; } else { this._x -= enemySpeed; } if (this._x<-10) { reset(); } if (this.hitTest(_root.spaceship)) { _root.gotoAndStop("gameOver"); } } // COW CODE onClipEvent (load) { laserMoveSpeed = 20; this._x = _root.spaceship._x+90; this._y = _root.spaceship._y; } onClipEvent (enterFrame) { if (this._name<>"laser") { this._x += laserMoveSpeed; if (this._x>700) { _root.spaceship.laserCounter--; this.removeMovieClip(); } for (i=1; i<=_root.numEnemy; i++) { if (this.hitTest(_root["enemy"+i])) { _root.score += 100; _root["enemy"+i].gotoAndPlay(2); } } } } //MAIN STAGE CODE numEnemy = 3; for (i=2; i<=numEnemy; i++) { enemy1.duplicateMovieClip("enemy"+i, i+100); } score = 0; |
|
|
|
|
|
#2 |
|
anything...are you sure?
Join Date: Jul 2001
Location: Mexico City
Posts: 560
|
Nice game here
![]() mmm, you don't tell what you want to do with it or what is not working(or im missing something here?), anyway...: remove the cow when it hits the trucks, increase the speed on enemy trucks, center the trucks on each track... spend a little more time on graphics (i love the cow as it is now!!), good luck!!! ![]() |
|
|
|
|
|
|
|
|
#3 |
|
Registered User
|
the thing i really want to know is how to wite a statement that
if the dynamic score box "SCORE" reaches a certain number the movie goes and to and play a new level (another frame number) im not sure where to do this as im not sure how to check the score value and i dont know how to send the movie to a certain frame any help would be brilliant thanks ps sorry about the very garbled post but it was very late when i posted it ![]() |
|
|
|
|
|
#4 |
|
anything...are you sure?
Join Date: Jul 2001
Location: Mexico City
Posts: 560
|
ahhhh, ok do this:
on a empty mc as a movieclip event: ActionScript Code:
![]() |
|
|
|
|
|
#5 |
|
Registered User
|
to everyone that has helped me in here .....
ive nearly finished my game http://www.texicare.co.uk/test/game/game.html thank you for the tips and tricks i am very happy for it to be my first game charlie ps if anyone knows why the trucks go over the top of the bridges on the secound level (even though the bridge layer is above the truck layer) please say as i will have to take it off otherwise thanks again |
|
|
|
![]() |
| Thread Tools | |
| Display Modes | Rate This Thread |
|
|