Show Posts

This section allows you to view all posts made by this member. Note that you can only see posts made in areas you currently have access to.

Messages - ianfitz

Pages: 1 2
Waaaaaat you are awesome.

Hey sorry I didn't see your replies sooner.

So I've just realized that the "get pressure for control" block only returns 0 or 1 intentionally; gamepad controls are meant to simulate keyboard controls, which can only be on or off. I think it would be much more fitting to turn it into a boolean block, but that already exists, in the form of "control is down". In other words, I think this block can be safely removed from the palette.

Hmmm, maybe I'm missing something here. I agree that the d-pad should be 0 or 1, as it is an on or off state. However, this should not be true for the analog control stick. The whole point is that it has a range of values between 0 and 1, in floating point form. Imagine moving a character by creeping forward vs. an all out run. This is what the analog control sticks allow you to do.

If they can't do that, they are nothing more than a glorified d-pad, so what's the point?

So in my opinion the root issue is that the analog controls tick is not reporting a floating point value.

I have another thread for this in the paid user forums here:,40094.msg225615.html#msg225615

I did get some acknowledgement/response from Justin, but no progress on a fix yet.

Hope this helps.

Bummer. Just installed Stencyl 3.3 and upgraded the test project. This bug has still not been fixed :(



I have a pretty extensive thread about this issue here:,38729.msg218756.html#msg218756

I'm finally to the point where I'm pretty sure this is a bug, and it's time to report it as such.

When trying to get the pressure value for an analog control an a wired Xbox 360 1st Party Controller, I only get a '1' or a '0' as the pressure value.

The expected behavior is I should get a series of floating point values, depending on the degree to which I have pressed the control stick.

Here is a narrated screencast explaining it all:

I have attached the stencyl project shown in this screencast.

I hope we can get it figured out!


Oh, and to prove this isn't a driver issue on my side, here's a screencast of the XBOX 360 Driver on my Mac, moving the left analog stick. You can see it's not just going to 1 or 0 position, but it's hitting many intermediate values in between:


Ask a Question / Re: Mapping Analog Control Sticks on Xbox 360 Gamepad
« on: February 20, 2015, 04:31:12 pm »
Also make sure you're not testing in Flash.

Bah, I wish that was it. If you look at the docs for gamepad support, you'll see one comment from me pointing out they need to make this clearer in the doc ;). So, I'm very aware of it and am running in Desktop mode, not Flash.

I don't use any degrees of pressure sensitivity for different things (that may be cool in the next game though!) for now I just use off or on for each direction. For the record, I set analog sensitivity to 42%. otherwise it was so sensitive it was hard to get it centered.

Thanks so much for checking out this thread!

Yea, I think I got as far as you did, our mappings look pretty similar.  And it works for me, but I am really trying to use the analog stick as an analog controller with degrees of pressure, otherwise it's basically a glorified D-pad. Nothing wrong with that, but not what I'm after.

That's good to know about 42% though, I've been using 25% as my reference point. At least when experimenting with how to extract pressure data, I'll leave it at 42% now.

Ask a Question / Re: Mapping Analog Control Sticks on Xbox 360 Gamepad
« on: February 20, 2015, 02:35:50 pm »
Yea...that's what I'm kind of afraid of :(. Doing my best to document this if it is a bug so it gets resolved.

It really seems like the problem is the pressure value is being reported as an integer and not a float.

Ask a Question / Re: Mapping Analog Control Sticks on Xbox 360 Gamepad
« on: February 20, 2015, 01:24:47 pm »
Okay, time for another sad, lonely, post where I talk to myself about how I can't get analog controls working!

Not much of progress report, other than I still haven't figured this out.

I'm still only getting '1' or '0' but no decimal value between the two when using analog control stick.

I thought maybe the problem was pegging the print statement against a key press event, as that's kind of a binary event.

So instead I just tried printing  control pressure during the 'Drawing' and the 'Updating' loops:

And I still get only output like this:

1's and 0's and not a decimal between'em.

I also thought, maybe the print statement is rounding my values for some reason? It doesn't seem like that would be a thing, but I tried 'Print as Absolute Value' and 'Print as Degrees' and didn't get any different output.

Can anyone help? Really hit a dead end here.

Ask a Question / Re: Mapping Analog Control Sticks on Xbox 360 Gamepad
« on: February 10, 2015, 07:21:46 pm »
Made a little bit of progress on this.

I mapped each direction of the left analog control stick like this (note also set the dead zone here as well):

And then set up a debug print like this:

And I got a reasonable response in the console. If I hit 'Up' on the left stick, I get '1', if I hit down I get '1', same for left and right. So, I seem to have everything mapped correctly now!

I think my problem now is that I am not getting any numbers BETWEEN 1 and 0, I am only getting "the stick has been pressed in  direction X" (1) or "the stick has not been pressed at all" (0).

Any idea how I can get the decimal values between 1 and 0, as that's the analog data I really need I think.

My guess is maybe I'm calling the print statement at the wrong time in the loop, so I will experiment with different times of doing that I guess (maybe in the draw loop I guess).

Edit: nope, sticking the debug print in my scene's 'when drawing' event didn't help, got same values of just 1 and 0.

Ask a Question / Re: Mapping Analog Control Sticks on Xbox 360 Gamepad
« on: February 09, 2015, 06:36:45 pm »
FWIW, this isn't some academic pie-in-the-sky question.

Here's a youtube demo of Super Deference Fighter, a prototype I made in stencyl:

Right now the D-pad is controlling the direction of the laser/gaze (mashing A button controls bowing). I'd like to get the analog stick to control the laser, and possibly the bowing too.

Soooooo, that's my interest in this. Please help!

Ask a Question / Mapping Analog Control Sticks on Xbox 360 Gamepad
« on: February 07, 2015, 08:23:20 pm »
Hi All,

I have two XBox360 gamepads working on my Mac, with a game I made in Stencyl (yay!). So far, I've just been using the D-Pad and the A button. Pretty straightforward.

I'd now like to try out getting the analog control sticks, starting with the left one, working with Stencyl. A little trickier I'm afraid.

Does anyone understand how to correctly map an Xbox Controller's Analog Stick? An example project would be amazingly helpful.

Here's what I've puzzled out so far:

When I debug print using this method:

I got these results:

6, +axis 0,
6, +axis 1

6, -axis 1
6, -axis 0

6, +axis 1

6, +axis 1 maybe the Analog Control Stick is just interpreted as one big, or maybe two buttons to stencyl...that makes sense, X axis and Y axis. And  maybe +axis 1 means "the stick has been moved in a positive degree using the Y Axis", and -axis 1 means "the stick has been moved in a NEGATIVE degree using the Y Axis".

But if that's the case, no clue why left and right print out both as +axis 1, and how I would differentiate that from the Y axis.

So then I thought, maybe what really matters is the level of pressure? At least it's something to debug print and see how it looks.

I did that like this:

Create a Key in Settings

Map the button to the key:

Print the pressure for the control:

The output I got was....


Just 0 over and and over again:

I'm stumped, anyone played with analog stick with Stencyl before, can give me some guidance here?

Ask a Question / Re: GamePad (Xbox for PC, Stencyl 3.2)
« on: January 27, 2015, 05:40:35 pm »
With a ton of help from @colburt187 , I got my Xbox 360 Gamepad working!

The trick, is I'm not 100% what finally tipped the scales, as I changed a bunch of things.

Most likely culprit is not having the 'enable gamepad' block. You should have something like this, which I didn't see documentation for on the Gamepad page in Stencylpedia:

Other notes, for future searchers who come across this thread:

1. I upgraded from OS X 10.10.0 to 10.10.2
2. I am using version 0.14 (Dec 22, 2014 release) of this driver
3. Just another reminder, controllers don't work in Flash. You have to do Run > Mac

Hope this helps someone!

Ask a Question / Re: GamePad (Xbox for PC, Stencyl 3.2)
« on: January 27, 2015, 07:03:36 am »
Yes, the more info the better!

Thanks for trying! Wonder if it's fixed in a private build or something.

Ask a Question / Re: GamePad (Xbox for PC, Stencyl 3.2)
« on: January 26, 2015, 06:00:29 pm »
Another update...I installed Stencyl on a Windows 7 laptop, latest Stencyl build (7994). Even on Windows 7 platform I am not getting any print statements to the log when I press a button on my Xbox 360 controller.

- Confirmed controller driver is installed/recognized by going to, confirmed screenshot similar to above
- Also added an event for "on press any KEYBOARD key" print key code to log, and this event works fine
- Am using Run -> Windows method of compilation, NOT clicking 'test' and NOT using Flash Debugger environment logging method works for keyboard, and my gamepad is recognized by the OS for sure on both Mac AND Win 7. Yet, Stencyl doesn't seem to register my gamepad.

Any help, please?

Pages: 1 2