xbox360 Controller - Analog Thumb

This forum is currently in read-only mode.
From the Asset Store
Small pixel icons for the 3 most popular controller types.
  • Hello, first of all thank you for this wonderful program.

    I'm a programmer (phyton, php and c) and I want to make a small game with construct just for fun. Since I'm a complete newby I wanted to make a geometry wars clone. Following the Ghost Shooter tutorial I was able to move and shoot with mouse and keyboard, I wanted to enable the 360 controller imput to aim and move, but with the analog sticks I only see a direction and a is down event. This means that I can't move and shoot like in geometry wars.

    Basically (if you are not familiar with the game) I want to move the sprite with the left thumb and shoot with the analog, this means that if the analog thumb is down the ship will continuosly shoot bullets in the direction of the thumb.

    Is this possible with construct?

    Thanks

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • Yes! you can get (left thumb x) and (left thumb y) and the same goes for the right analog stick and the triggers. you need to use them in an expression though, its the only way it really makes sense. the value scales from -1 to 0 to 1 based on how much its being "pushed", you multiply it to scale and add that to an objects current x,y velocities to get a geometry wars-ish movement. for the gun you make use of angle(x1,y1,x2,y2) and use x1=0 y1=0 x2=rightthumbx y2=rightthumby to get the current "direction" of the stick!

    you should find them and figure it out if you select the xbox360controller plugin when you're writing an expression.

    good luck

Jump to:
Active Users
There are 1 visitors browsing this topic (0 users and 1 guests)