Move object with xbox 360 controller

This forum is currently in read-only mode.
0 favourites
From the Asset Store
JPEG format 364x HD backgrounds in 2688 x 1536 Resolution
  • Hi,

    I'm making a platform game. I'll add to my multiplayer game that is played on the same computer. The problem is that when I add the controls for player 2 to the list of controls, I can not put the controls of a game-xbox360 pad. I also added the object "Xbox360 Controller" ... Help me please!

    <img src="smileys/smiley19.gif" border="0" align="middle" />

  • Please, Help! <img src="smileys/smiley19.gif" border="0" align="middle" />

  • Can you show us a cap file of what you're trying to do?

    Edit: Ah, I think I see what you're trying. Unfortunately you will need to use events to control the behaviors with an Xbox 360 controller.

    Can you tell me which behavior you are trying to control? I will then try to make a cap file example for you.

  • Currently I can not upload an example of what I'm trying to do, but will try to explain it to you:

    I have a layout with the object "Xbox360 Controller" in place, and what I'm trying to make is that when the player press a button of the Xbox 360 Controller (This I will do so by events) the sprite "Player 2" forward for example a pixel . Do you understand me? <img src="smileys/smiley14.gif" border="0" align="middle" />

  • Ah yes, that's quite easy. I thought you were suggesting that the controller affects the objects built-in behavior, but pixel movements are not a problem!

    Important thing to remember is that Player 2 is being controlled by Controller 1 if the first player uses a keyboard and mouse.

    Would you like me to post an example of moving with a 360 controller?

  • I would not, I would love :) This much I need to finish the co-op of my game, please make an example.

    And you know how to add gravity as if the platform Behavior?

  • Sure thing =] Here's files I made for 360 movement a while ago:

    360 Control Type1

    360 Control Type2

    As for gravity you can do this:

    Always:

    -> Object.Y = Object.Y + (9.8 * 1000 * timedelta)

    9.8 to represent something like Earth's gravity, and 1000*timedelta is to keep it at a constant speed regardless of the computer it runs on.

  • And gravity could not be done by adding a behavior to the object? = S

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • Jayjay

    Is the 360 controller the only one Construct can handle?

    Will a PS1/2/3 or other controllers work or will they require a special plugin of their own to be functional?

  • adriel0000 No, it'd be in events under "Always" from the System object you put an action for the "Object to Set Y" position.

    aznmonkeyboy Kinda, you can use x360ce to emulate an Xbox 360 controller with other kinds, get that here.

    Just download the ini and dll for it and you can place that in the folder of any game requiring Xbox360 controllers to use your own =]

  • You misunderstand me, I mean if I can use some Behavior such as behavior "Phisycs" for my player 2 has relistas gravity and physical, but I've put it and the player 2 goes crazy XD.

  • If you're using Physics for the player 2 object then it should do gravity just fine. I'm not sure what you mean by this.

  • You can give me an example of how to make a gravity? What also could give me an example of how to make a leap that use gravity? Is that if I use the Behavior character physics gravity only affects you when you move and then it goes to that site without stopping ...

  • I gave you the example events in plain text. If you're using Physics, the best way is to let the Physics behavior do the gravity, and just apply a force to the object in the air when trying to jump.

    Can you post a cap of what you have/are trying to do?

  • I can not publish it as well, will not let me so I can not ... But I do not understand the example of gravity that put me in a comment above. And when I use the Behavior gravity works well ... What choices do I have to check / edit the behavior "physics"?

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