Sunday 1 February 2009

Gym Button (Str Training)

To make a Gym button first make the button itself, and remember make sure
the buttons a button not a movie clip.

Add this action script to the button

on (release) {
if (_root.Energy > 49){
_root.Energy -=50 ;
}
if (_root.Energy > 49){
_root.Str +=1 ;
}
}



The code basicly means if energy is 50 or above then take away 50 energy and add 1 Str.

Work Button

To make a work button first make the button itself, and remember make sure
the buttons a button not a movie clip.

Add this action script to the button

on (release) {
if (_root.Energy > 24)
{_root.Energy -=25 ;
}
if (_root.Energy > 24)
{_root.Cash +=25 ;
}
}


The code basicly means if energy is 25 or above then take away 25 energy and add 25 cash.

Making the game playable.

To make the game playable you have to actually be able to see what your doing ....
by this I mean when you click a button you see the effects, to do this do the following.

.Make sure you've done

How To Get Started

.Make 5 text box and change them from static text to dynamic text.

.Type the words Clev, Str, Cash, Energy and Day into the box's so now when you
play you will be able to see the effects such as say you click a button that effects your energy
the energy text box will change.

Sleep (rest) Button

Very simple make a button and add this code

on (release) {
Day +=1
Energy =100
}


This means that on release add 1 to day and make energy 100.