Heyy there..
I was wondering if somebody could take a quick look at my code and possibly explain what I'm doing wrong? Right now I'm trying to code movement of a Entity with a Playstation Joystick.. The problem is the joy_force.x, because it's only controlling the pan of the Entity in ONE direction. As you can imagine there is 4-DPad buttons.. Up,Down,Left, and Right. and It only moves to the right. I want to be able to move the entity to the left, and to the right.

How would I go about fixing my code to make it work?

Thanks for any help!
-Brock



Code:
 	while(1)
	{
		wait(1);
		
		if(joy_force.y)
		{
			c_move (my, vector(6*time_step,0,0), nullvector, GLIDE);
   		wait (1);
		}
		
		if (joy_force.x)
		{	
			my.pan += 8*time_step;
		}
		
		if (!joy_force.y)
		{
			idle_percent = (idle_percent +2*time_step)%100;
			ent_animate(me,"stand",idle_percent,ANM_CYCLE);
		}
		else
		{
			ent_animate(me,"walk",walk_percent,ANM_CYCLE);
			walk_percent += 10 * time_step; 
		}	
		if (joy_2 && joy_force.y)
		{
			ent_animate(me,"run",run_percent,ANM_CYCLE);
			run_percent = 7* time_step;
		}
	}