like aoe
 Posted: Fri Mar 23, 2007 9:57 pm
Posted: Fri Mar 23, 2007 9:57 pmhi, its me again, now im trying to do the view move like in the Real Time Strategy games, but just in the x axis
			 Posted: Fri Mar 23, 2007 9:57 pm
Posted: Fri Mar 23, 2007 9:57 pm Posted: Fri Mar 23, 2007 10:22 pm
Posted: Fri Mar 23, 2007 10:22 pmangle = direction(x + width / 2, y + height / 2, Player.x, y + height / 2);
directional_velocity = distance(x + width / 2, y + height / 2, Player.x, y + height / 2) / 25;
 

 Posted: Sat Mar 24, 2007 2:55 am
Posted: Sat Mar 24, 2007 2:55 am Posted: Sat Mar 24, 2007 1:04 pm
Posted: Sat Mar 24, 2007 1:04 pmxvelocity = (Player.x - (x + width * .5)) / 25;#define halfwidth 512 Posted: Sat Mar 24, 2007 6:48 pm
Posted: Sat Mar 24, 2007 6:48 pm#define halfX view.width / 2
#define halfY view.height / 2 
 Posted: Sun Mar 25, 2007 1:09 am
Posted: Sun Mar 25, 2007 1:09 amSgt. Sparky wrote:draw actor for view:
- Code: Select all
angle = direction(x + width / 2, y + height / 2, Player.x, y + height / 2);
directional_velocity = distance(x + width / 2, y + height / 2, Player.x, y + height / 2) / 25;
that should work
notice that I do not use Player.y,
that is because you do not want the view to move up and down
 Posted: Sun Mar 25, 2007 6:06 pm
Posted: Sun Mar 25, 2007 6:06 pmif(Able == 1)
{
   angle = direction(x + width / 2, y + height / 2, Player.x, y + height / 2); 
   directional_velocity = distance(x + width / 2, y + height / 2, Player.x, y + height / 2) / 25;
}Able = 1; 

 Posted: Sun Mar 25, 2007 11:57 pm
Posted: Sun Mar 25, 2007 11:57 pm
 Posted: Mon Mar 26, 2007 12:52 am
Posted: Mon Mar 26, 2007 12:52 am