whats wrong with my code?

Game Editor comments and discussion.

whats wrong with my code?

Postby jagheera nex » Thu Sep 20, 2007 2:55 am

yo,i want my actor to jump faster than he runs this is what i have:


Code: Select all
if(compass == 1);
xvelocity = directional_velocity + 1;
if(compass == -1);
xvelocity = directional_velocity - 1;



the compass is a varible and when i go left the compass is positive, when i go right it is negitive. but when i jump left he goes in a cercile motion but when i jump right its just what i wanted, how do i make it so he jumps far left when i go left and he jumps far right when i go right? :!:
User avatar
jagheera nex
 
Posts: 46
Joined: Sat Jul 28, 2007 4:13 pm
Location: dik
Score: 1 Give a positive score

Re: whats wrong with my code?

Postby pixelpoop » Thu Sep 20, 2007 6:23 am

if(compass == 1){
xvelocity = directional_velocity + 1;}
if(compass == -1){
xvelocity = directional_velocity - 1;}
User avatar
pixelpoop
 
Posts: 276
Joined: Tue Aug 29, 2006 9:32 pm
Score: 28 Give a positive score

Re: whats wrong with my code?

Postby jagheera nex » Tue Sep 25, 2007 1:30 am

thanks
User avatar
jagheera nex
 
Posts: 46
Joined: Sat Jul 28, 2007 4:13 pm
Location: dik
Score: 1 Give a positive score


Return to GE - General

Who is online

Users browsing this forum: No registered users and 1 guest

cron