PDA

View Full Version : rolling game



Anniebelle
September 3rd, 2003, 10:52 AM
Im a complete novice when it comes to actionscripting, so im wondering how i could implement code so that the 'rock' falls randomly, and when it comes into contact with the rolling dino, an alert pops up asking you to retry. after clicking 'ok' it restarts the game.

Cheers.

Anniebelle

jingman
September 3rd, 2003, 11:19 AM
I'm working on your fla.

Anniebelle
September 3rd, 2003, 11:20 AM
you are a legend!

jingman
September 3rd, 2003, 11:53 AM
Ok, one step at a time (and I have class, so the rest will come later).

Here is the dino rolling back and forth. Right now it gets a random speed every time you load it, but you can change that.

Anniebelle
September 3rd, 2003, 12:39 PM
thats mad! cheers
you even did a background too! how sweet :D

jingman
September 3rd, 2003, 04:50 PM
Here we go, part 2 - The Sky is Falling!

You'll notice I used actionscript physics instead of a tween to control the movement of your rocks, this will make it much cooler and robust.

jingman
September 3rd, 2003, 06:17 PM
Alright, Part 3 - The Dinosaur Takes a Hit

jingman
September 3rd, 2003, 09:31 PM
The Conclusion - Controlling Dino

This has been fun. It's actually the first game I've made, so hey, thanks!

Some notes about the final fla here:

the variable 'fudgeFactor' is to let the rock get closer to the dinosaur before it registers a hit.

You can change the speed variable, everything else will fix itself accordingly.

There are a few places where I just wrote "40" instead of _width, you can muss with it and see what you like.

Goodluck with this, have fun! I would love to see what you finally do with it.

Anniebelle
September 4th, 2003, 01:53 AM
wow! thats amazing! it looks great
thanks for all that. i really appreciate it!

Cheers :D