Game Controllers?

Help creating logic scripts for Air Manager Instruments

Moderators: russ, Ralph

Post Reply
Message
Author
issacsim
Posts: 2
Joined: Mon Aug 24, 2020 12:46 pm

Game Controllers?

#1 Post by issacsim »

Hello,

Can game controllers be accessed in scripting?

User avatar
Ralph
Posts: 7917
Joined: Tue Oct 27, 2015 7:02 pm
Location: De Steeg
Contact:

Re: Game Controllers?

#2 Post by Ralph »

No. Only Arduino, Raspberry Pi and ESP32.

User avatar
Corjan
Posts: 2939
Joined: Thu Nov 19, 2015 9:04 am

Re: Game Controllers?

#3 Post by Corjan »

Hi,


Actually, there is something in the AM 4.0 BETA that could help:

Code: Select all

function callback(type, index, value)
    print("type = " .. type .. ", index = " .. index .. ", value = " .. tostring(value))
end

joystick_add(callback)
Note that this is NOT officially supported, so no support whatsoever. Also only works on Windows.


Corjan

SimPassion
Posts: 5338
Joined: Thu Jul 27, 2017 12:22 am

Re: Game Controllers?

#4 Post by SimPassion »

I guess it's not currently enabled internally and we will evaluate this feature later, no react in Console
No worries, don't take time on it for the moment, as you already stated @Corjan

Gilles

Joystick_Feature_Check_01.jpg

User avatar
Sling
Posts: 5237
Joined: Mon Sep 11, 2017 2:37 pm
Contact:

Re: Game Controllers?

#5 Post by Sling »

If it’s not supported and not in the API is probably best we don’t know about it because now questions will come :lol:

SimPassion
Posts: 5338
Joined: Thu Jul 27, 2017 12:22 am

Re: Game Controllers?

#6 Post by SimPassion »

Sling wrote: Tue Aug 25, 2020 8:47 am If it’s not supported and not in the API is probably best we don’t know about it because now questions will come :lol:
This is why I made the check for anyone to know and specified the unavailability, so no need for any additional question ;-)

Gilles

User avatar
Sling
Posts: 5237
Joined: Mon Sep 11, 2017 2:37 pm
Contact:

Re: Game Controllers?

#7 Post by Sling »

SimPassion wrote: Tue Aug 25, 2020 9:28 am
Sling wrote: Tue Aug 25, 2020 8:47 am If it’s not supported and not in the API is probably best we don’t know about it because now questions will come :lol:
This is why I made the check for anyone to know and specified the unavailability, so no need for any additional question ;-)

Gilles
I didn’t mean from you Gilles but myself actually. I’m intrigued now about this and obviously want to know more.

User avatar
Corjan
Posts: 2939
Joined: Thu Nov 19, 2015 9:04 am

Re: Game Controllers?

#8 Post by Corjan »

Hi,

Well, it was just a hack I made since I wanted to make a game in AM ;).
It simply gets the first joystick it can find, and throws all it's events (buttons, axis) in the lua callback.

Corjan

issacsim
Posts: 2
Joined: Mon Aug 24, 2020 12:46 pm

Re: Game Controllers?

#9 Post by issacsim »

Thanks !

I will become a customer if it's ever released.

User avatar
Corjan
Posts: 2939
Joined: Thu Nov 19, 2015 9:04 am

Re: Game Controllers?

#10 Post by Corjan »

There are no plans to release it,

Corjan

Post Reply