Tutorial - Setting up a controller

Learn how to make certain types of games and use gameEditor.

Re: Tutorial - Setting up a controller

Postby SuperSonic » Wed Jan 25, 2012 10:00 pm

Ok, the controller works with the new drivers but still nothing happens when I run your example :(

Have you ever had problems like this?
A tree never hits an automobile except in self-defence.

Want to use your joystick or controller with Game Editor? Check out my controller engine =D
User avatar
SuperSonic
 
Posts: 1444
Joined: Fri Sep 24, 2010 9:24 pm
Location: Anywhere
Score: 72 Give a positive score

Re: Tutorial - Setting up a controller

Postby Hblade » Wed Jan 25, 2012 10:05 pm

not really o-o

I'l try and help as much as possible. o-o see if the buttons work.
Subscribe to my YouTube? - Yes| No
User avatar
Hblade
 
Posts: 4345
Joined: Fri Dec 08, 2006 11:14 pm
Score: 167 Give a positive score

Re: Tutorial - Setting up a controller

Postby SuperSonic » Thu Jan 26, 2012 8:48 pm

Ok, will do. I'll let you know what happens :)
A tree never hits an automobile except in self-defence.

Want to use your joystick or controller with Game Editor? Check out my controller engine =D
User avatar
SuperSonic
 
Posts: 1444
Joined: Fri Sep 24, 2010 9:24 pm
Location: Anywhere
Score: 72 Give a positive score

Re: Tutorial - Setting up a controller

Postby SuperSonic » Fri Jan 27, 2012 3:49 pm

It didn't work. I tried all of my buttons and even the analog sticks again. Nothing :(

Here's the code I used on my actor's draw code:
Code: Select all
float ls_XAxis = GetJoystick1Axis(0);
float ls_YAxis = GetJoystick1Axis(1);
int i;
int Button[14];
for(i=0; i<14; i++){
Button[i] = GetJoystick1Button(i);
}


xvelocity=ls_XAxis/10000;
yvelocity=ls_YAxis/10000;
if (Button[0])
{
    r = 89;
    g = 0;
    b = 0;
}
A tree never hits an automobile except in self-defence.

Want to use your joystick or controller with Game Editor? Check out my controller engine =D
User avatar
SuperSonic
 
Posts: 1444
Joined: Fri Sep 24, 2010 9:24 pm
Location: Anywhere
Score: 72 Give a positive score

Re: Tutorial - Setting up a controller

Postby SuperSonic » Fri Jan 27, 2012 3:56 pm

Never mind. It works now :shock: I don't even know what I did :lol:

Ok cool. I'm gonna finish your tutorial Hblade :D

*edit: Whoops, I didn't realize that that was the end of the tutorial haha :lol: Plus one for you Hblade :wink:
A tree never hits an automobile except in self-defence.

Want to use your joystick or controller with Game Editor? Check out my controller engine =D
User avatar
SuperSonic
 
Posts: 1444
Joined: Fri Sep 24, 2010 9:24 pm
Location: Anywhere
Score: 72 Give a positive score

Re: Tutorial - Setting up a controller

Postby Hblade » Fri Jan 27, 2012 8:15 pm

Thanks ^^
Subscribe to my YouTube? - Yes| No
User avatar
Hblade
 
Posts: 4345
Joined: Fri Dec 08, 2006 11:14 pm
Score: 167 Give a positive score

Previous

Return to Tutorials

Who is online

Users browsing this forum: No registered users and 0 guests