megatronx's Recent Forum Activity

  • Cool electro soundtrack man. Show some screens!

  • Looks ace mate

  • > Any clue what index right stick axes are?

    >

    I haven't used this object myself yet, but you could test this pretty quickly. I've made a capx for you. I hope it works, I can't check myself as I don't have a gamepad hooked up.

    https://www.dropbox.com/s/8pes8gkyav87f ... .capx?dl=0

    The reason it probably isn't specified is because there are many different gamepads out there, each with different amounts of input axes/mappings.

    Thx, but don't have installed latest beta.

  • Hi Megatronx, Is something like this what you are looking for?

    https://www.dropbox.com/s/qf88r9zb2bfwn24/mouse_sustitution.capx?dl=0[/code:257551y6]
    
    Basically you create a second "mouse", if the real mouse is still visible I guess you could make "at the start of layout" > mouse > Set cursor style > none.
    
    That way the mouse would be invisible when it overlaps the game window.
    I hope it helps.
    

    No. I have that already. What I'm after is moving the object at exact angle of the angle of right analog stick. So if I press the stick at 78 degrees, that will be the angle the object moves.

  • Ashley, sorry, but could you help as this is really complicated to me. How can I get a cursor to follow 1:1 the right analog stick on 360 controler? What I'm after is moving the object at exact angle of the angle of right analog stick.

  • Any clue what index right stick axes are?

  • Here is the manual entry for gamepad - https://www.scirra.com/manual/143/gamepad

    I think what you are looking for is the following expression:

    [quote:1iqz9ynz]Axis(Gamepad, Index)

    Retrieve the current position of an analog joystick on a specific gamepad. Index specifies left analog X and Y or right analog X and Y axes, subject to Key mapping. Axes range from -100 to 100. Axis values within the Analog deadzone are returned as 0.

    So use this to get X and Y values that you can use in the arctangent formula.

    Ok, will give it a try mate. Thanks

  • What is your stick? Is it a controller's analog stick (gamepad object), or did you create a touchscreen analog stick with sprites?

    The formula for getting angle in degrees from coordinates is atan(changeinY/changeinX)

    If you are making your own touch analog stick - compare stick's current position to the origin position to get change in Y and change in X, use the formula to get your angle from origin, and then use Move At Angle.

    I use xbox gamepad. How would you do that with it?

  • Use the action:

    Move at angle
    Move the object a number of pixels at a given angle in degrees[/code:28sy298i]
    

    Thanks, ut that's not what I'm after as this is what I'm doing right now, and only have 8 direction ( and I don't fancy manually creating more ). Instead I'm looking for a solution to get angle of the stick, so it moves always at exact angle f the stick, so you can rotate it with stick.

  • Hi,

    To be more precise, I have a cursor controlled by analog stick. Right now it can move in 8 directions, but I'd like to make it turning smoothly. What I'm after is moving the object at exact angle of the angle of right analog stick. Any clue how can I do that? Thanks

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • The whole point of For each is to pick only one object at a time - how would all be affected?

    Edit: only those items that have timed-out at the same time will be picked when entering "On timer". From there, For each will cycle just them.

    Oh, ok, didn't realise that, as I've been thinking linearly downwards. Usually I'd do For each first and then condition/s filtering the objects. AS an example:

    For Each, Boo = 1 would be the same as Boo = 1, For each , or if not, then why? Thx

  • Manual:

    [quote:2ghr2vne]On timer

    Triggers either regularly, or once off, after a timer that was started with the same tag has reached its duration. NOTE: this trigger can fire with multiple instances picked, if their timers all reach their time in the same tick. This can sometimes work unexpectedly if the actions expect there to be just one instance picked. The workaround is to add a For each condition after this trigger to ensure the actions run once per instance.

    It might be because of late hour here, but in this case, then there's has to be another condition that will lock out those that are not meeting the timer condition, right?

    Let's say you want to destroy object on timer. Number of them triggers simultaneously. What would you do to avoid destroying all objects (because of For each condition)? And now I know what was causing those random issues in my projects. And I wasn't expect this to be it, since it is counter intuitive.

    Ashley Hope that it is going to be fixed in c3, with stacking up objects.

megatronx's avatar

megatronx

Member since 25 Sep, 2008

Twitter
megatronx has 1 followers

Connect with megatronx

Trophy Case

  • 16-Year Club
  • Forum Contributor Made 100 posts in the forums
  • Forum Patron Made 500 posts in the forums
  • Forum Hero Made 1,000 posts in the forums
  • Regular Visitor Visited Construct.net 7 days in a row
  • Steady Visitor Visited Construct.net 30 days in a row
  • RTFM Read the fabulous manual
  • Email Verified

Progress

23/44
How to earn trophies