clank-o-tron's Forum Posts

  • 4 posts
  • Great, thanks again! It seems like I'm in the minority for wanting to use python so much, so I definitely appreciate the quick, thorough answers.

    Speaking of which, is there a place where python functions / parameters are documented? If not, I'm willing to update the wiki what I learn from my experiences.

  • I've run into some weirdness with python again, and I was hoping someone could give me a hand. I can't seem to actually get any results with Sprite.Overlaps() in python, even though the same operation works just fine in the event sheet.

    I have a "Player" sprite with the platform behavior running around (well, sliding anyway) on top of a solid object and another, non-solid sprite that is intended to work as a trigger (currently named Sprite3). No matter where I go onscreen, Player.Overlaps(Sprite3) always returns false from my python script. Has anyone else had trouble with this?

  • Brilliant! That worked perfectly, R0J0 - I'll file that bit of knowledge away for future use.

    For anyone else who's curious about the specifics:

    Xbox360Controller.ButtonState(1, 13) returns 1.0 if B is pressed on controller 1, 0.0 otherwise.

    Xbox360Controller.IsButtonDown(1,13) returns True if B is pressed on controller 1, False otherwise.

  • Try Construct 3

    Develop games in your browser. Powerful, performant & highly capable.

    Try Now Construct 3 users don't see these ads
  • Hey all! Has anyone tried handling input from a Xbox360 controller in python? The analog sticks and triggers seem pretty straightforward, but I haven't been able to figure out how to get button presses (face buttons, shoulders, etc).

    Using the excellent Python Shell by Silent Cacophony I was able to locate the Xbox360Controller.ButtonState and XboxController360.IsButtonDown functions, but they both take a second mystery parameter that I'm unable to figure out (the first parameter, of course, being the controller index (non-zero based, incidentally)).

    All these return false:

    Xbox360Controller.ButtonState(controllerIndex, "B")

    Xbox360Controller.ButtonState(controllerIndex, "Button B")

    Xbox360Controller.ButtonState(controllerIndex, "Button_B")

    Has anyone had any success with either of these functions, or can someone point me to some documentation for the Xbox360Controller plugin?

    Thanks!

  • 4 posts