Announcement

Collapse
No announcement yet.

Listen for action rather then timer

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

  • Listen for action rather then timer

    I am playing with the controller idea for my game using a few peoples ideas here and IP's memory plugin and I have to say it makes for a really fun way to control a image in AMS but my problem is that I can get the sprite to move right if it time is set to like 200 but for some reason it will sometimes not all the time but sometimes move threw blocking objects, but not always but is I set the timer to 250 it stops the moving threw but it no longer fires the key check fast enough any more.

    I need a better way to listen for the key events of the controller maybe using a Multithread plugin or something but still don't know how to listen for the reply.

    Update
    The contoller as Y and X 0 to 65535 and I divided this by 4 thinking I would better a better movement out of the controller, even tho it offered a nice movement range it seem it was enough to fire the command more then once at times this is only thing I can thing of, so I change my sweet spot of the movement to up 60000, 20000 it seems to of fixed that sweet spot of going in to walls AT the moment.


    Also do you think its possible to controll the mouse with the controller I want to use it as the mouse with thumb stick as mouse and A as left click this would be easier then trying to caputre the opbjects and tab throw them and so on thanks
    Last edited by kingzooly; 06-23-2015, 05:22 PM. Reason: Update
    Plugins or Sources MokoX
    BunnyHop 2021 Here

  • #2
    First... You shouldn't be using a timer to check the new status of your joystick. You should be using the joySetCapture function.

    Anyway, if you want to keep using a timer then you could use lua lanes (using linda timers and objects) instead of the ams timer.

    Comment


    • #3
      Originally posted by webultra View Post
      First... You shouldn't be using a timer to check the new status of your joystick. You should be using the joySetCapture function.

      Anyway, if you want to keep using a timer then you could use lua lanes (using linda timers and objects) instead of the ams timer.
      I don't want to use the timer at all but what other options do I have I not going to use lanes simeple fact I have no idea how to use it or support it,

      joySetCapture ? I didn't see that in the section when I was looking up how to use the joypad, could you download the demo I posted in the other thread GamePad example and what AMS can do for you

      But would that not be a blocking function so wouldn't that mean having to use another plugin like a multithead plugin I don't want to use loads of plugins to make this work, it does work with the timer for basic use.
      Plugins or Sources MokoX
      BunnyHop 2021 Here

      Comment

      Working...
      X