iznaut's Forum Posts

  • It was recommended to me to use the Cordova CLI, but now I have a weird audio issue and don't know how to fix it. :/

  • Instead of using global variables, make ratio, dx, dy and ang instance variables of Sprite2 and all should work..

    Good call! Working perfectly now. Thanks for the help, everyone.

  • Yeah, the For Each doesn't seem to make any functional difference. Still no luck getting simultaneous moving objects, either, which seems odd since it's more or less the same as LittleStain's working one as far as that piece is concerned?

    It's worth noting that I also tried R0J0hound's "no dragdrop" workaround with no change.

  • Sorry, I think I neglected the fix in LittleStain's capx. I don't use multi-touch devices so I didn't test. The fix is to do what LittleStain did in his capx.

    1st add this event:

    on touched sprite2
    --- sprite2: set touchID to touch.touchID[/code:1wje2lv4]
    
    2nd replace sprite2.x and sprite2.y with
    touch.XForID(Sprite2.TouchID)
    and
    touch.YForID(Sprite2.TouchID)
    
    That should make it behave like LittleStain's capx.
    

    I made those changes but nothing seems to have changed. Does this look correct?

  • Here's the example tweaked to work with rotated ellipses.

    For unrotated ellipses dx and dy are just (Sprite2.x-sprite.x) and (sprite2.y-sprite.y).

    Hey, that's awesome! I was just trying to figure out how to get the center area of my pill shaped track to work (and failing), so this example is a nice surprise.

    The only issue is that it doesn't allow for multiple players to move independently (or at all, it seems) like LittleStain's example. How would I go about setting that up here?

  • Good advice, I'll give that a shot. Thanks again for all your help!

  • Yeah, I'm no good at math, either, ha.

    What if it was more of a pill shape with multiple sprites? Like, two circles for the sides (but only half is used) and two lines in the center connecting them? It doesn't need to be EXACTLY an oval, but my thinking is that I'd like the sprites to rotate around as much of a widescreen window as they can. Something with the sprites changing their movement behavior when they collide with a different part of the pill?

    I guess an RC racetrack (in the simplest configuration) would be a better visual analogy?

  • Sorry, another try..

    That's it! It works perfectly. Thank you so much for your help.

    Bonus question: If I were to change the shape of the circle (perhaps to make it more of an oval), how would I change the code? It looks like I'd maybe have to change that "move 0.5*sprite.width pixels" bit?

  • Ah, ok.. can't test on mobile now, but my implementation of the touchID leaves something to be desired..

    try this:

    Still behaving the same. I tried doing something similar with picking events but it also didn't seem to work.

  • I would go for something like this:

    Wait, I lied! There's still an issue with this one, but hopefully you can help me figure it out.

    When I try this on a touch device, I can move one circle fine, but touching the second one immediately jumps it to the position of the first touch. I'd like to link the separate instances of these sprites to whatever touchID touched them last, so multiple players can move multiple sprites at the same time independently.

  • I would go for something like this:

    This is exactly what I was looking for! Thank you!

  • It's definitely the Touch object. I spent a few weeks banging my head over this issue (even when it got approved the first time, I still had a handful of negative reviews because of the shady prompt) and finally nailed this down after slowly eliminating plugins from my project until it didn't give the prompt anymore.

    If you build a C2 project without the Touch object and upload it to PhoneGap, it will NOT display the location prompt.

    I appreciate your help and understand that it's out of your hands! It's just a very frustrating problem to have this late in the game, haha.

  • I just rebuilt the version of my project with the Touch object intact and checked the IPA file. The "hello world" config.xml still has the "permissions none" flag despite throwing that location prompt when I install it.

    I can report this to PhoneGap Build, but if you could recommend any temporary workarounds (some value in the Info.plist I could change?), it would be greatly appreciated. I was able to get my app approved in the App Store the first time around, but they rejected my update the second time around due to that prompt. So, it's effectively impossible to get any touch enabled C2 project approved on iOS as it stands (unless you get a lax reviewer, I suppose). PhoneGap Build is the recommended export method, correct? No alternatives with comparable performance?

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • I want to have multiple players able to move their own objects along the rail (on a touch screen device), so I won't be using the mouse object.

    I also want to have the object actually move along with the player's finger, perhaps with a bit of leeway so it can continue moving even if they get a little ahead of the object itself (I could do an "Is touching object", but the movement stops immediately if the player isn't right on top of it the whole time).

    I think your examples with the two circles is pretty helpful if I make the size difference very minimal (I really want zero forward or backward wiggle room...only sliding left or right down the "rail"),

  • I'd like to create a game in which the player object can be touched and dragged around a circle, but not off-circle. So, effectively, the circle acts as a "rail" that the player is locked to and can navigate freely, but only left or right around the outline.

    Can anyone offer any advice on how to make something like this work?