Basicly i am wanting to get end producy of a golf style game (side scroller)
but starting with getting the movement down as i am new to AS/Flash
I have movment down by i can’t get the speed to update on each frame by velocity (which atm is hard coded but that will change) + gravity…but it only updates once…
here is my code…
these variables are delcared in root frame
var fall=false;
var stopy=false;
var gravity = 6;
var vel= -12;
var speed;
on the ball MC i have this code…
onClipEvent(enterFrame)
{
speed = _root.vel + _root.gravity;
if (this._y<=10)
{
_root.fall=true;
}
if (_root.fall==true)
{
speed=6;
}
if (this._y>=385)
{
_root.stopy=true;
}
if (_root.stopy==true)
{
speed=0;
}
this._y += speed;
}
I am sure i am just missing somthing simple…just remember i’m a newb. if anyone can and will help…thanks