PDA

View Full Version : Ray-like Game


Max
12-30-2006, 09:28 AM
i need help putting together an engine for a Ray-Like Game, If you havent heard of it or played it before, you can see it on NEWGROUNDS, just search Ray Part 1, or Ray Part 2.

Ive got the basics figured out, like chosing your own adventure, each button goes to another frame, if you make a bad choice it goes to the frame where it shows an animation, then you die, and it goes to a frame where it says "retry", there is one thing I can't seem to figure out, how do i make it, for example, when it comes to the choice of:

a) going from a far range and shooting the guy with a sniper = 5 points
b) take a knife and go close-combat = 2 points
c) Run away from the mission, and be a coward = 0 points

And when the choices were made , it adds onto a total at the end of the game, like if you got 5 points in one mission, and 3 points in another, then in total you have 8 points, how do i make the game save the information until the last frame, where the total is shown.



- Any Help is Greatly Appreciated

LizardRob
12-30-2006, 12:53 PM
Pretty simple just using variables.

Put;
Points = 0;
on the frame.

Then, you need to add;
Points += 5

In a place like;
onEnterFrame = function (){
if (man.wall.hittest){
Points += 5;
}
}

Max
12-30-2006, 01:16 PM
LOl , i've been waiting for a response for over 3 hours, tyvm

LizardRob
12-30-2006, 01:19 PM
No problem.

Max
12-30-2006, 03:47 PM
i don't understand your instructions, ... can you explain it to me as simply as you can ?

The Brown Cow
12-30-2006, 04:29 PM
I don't know how it could be simpler.

Create a variable to keep track of points. Set it to 0.
Every time the player does something to earn points, increase the value of the variable.

On the first frame (before the game starts), set the value to zero:
score = 0;

On a frame or button that you want to have increase the score (by 3):
score += 3;

Max
12-30-2006, 04:51 PM
I see now, thanks

doomlord
12-31-2006, 12:26 AM
if you want it like ray its vryvry simple just have when some1 presses the button it goes to a dif scene and on ray the person writes down the number its a very simple flash movie thing, also dont double post i hope you got in trouble for it coz i did first time i did it
but having a counter is unlike ray coz person writes down the score so maker of ray is lazy bum in AS! but yea just have counter in top corner and have each button adds to it i think you got it but here it is anyway
on (press) {
gotoAndPlay("sniper1")
_root.ray_mc.points += 1;
}
i dunno i would do that

Max
12-31-2006, 09:07 AM
Ty , i guess

LizardRob
12-31-2006, 10:44 AM
It would just be "points" or "_root.points" in doomlord's example.

Max
12-31-2006, 10:51 AM
Thanks for clearing that up, anyways ... are either of u guys good artists? cause i need one for making this ... im not too much of a good artist myself ...