[SOLVED]How the heck do I do this...?/Control sytem.

0 favourites
  • 10 posts
From the Asset Store
Have you tried to create realistic and at the same time casual tank movements? You found the perfect solution!
  • Hello World,

    So as usual with me, I took something simple and managed to turn it into something super complicated(imo). This time instead of writing 10 pages of text trying to explain what I wanna do(and probably still failing to be 100%clear) I thought I'd just make a video to show/tell you guys what I need help with.

    So download the video please from the link below, watch it, and then if you have anymore questions I'd be happy to answer them.

    Thank you.

    Link: Click Me

  • Ok so wouldn't changing the "touch is touching" to "touch is touching object arc" do what you want?

    There are obviously many other ways to do it..

    Using either the clamp()-expression or "is between angles" condition, maybe in combination with the distance() expression..

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • I've never heard of the clamp expression before LittleStain , sounds interesting, could you make a little example capx with that one so I can see how it is used?

    The main problem isn't so much changing the touch event for the rotation. But how do I olso make it so that that little "light" appears under/follows your finger, but only within the confines of the arc?

  • could be as simple as:

    touch is touching arc - light set position to to touch.x,touch.y

    on any touch end - light set invisible

    A lot of it depends on what you want..

  • I had this example in my dropbox using the clamp:

    Clamp mouse cusor

  • Ok, thank you. I'll play around with those suggestions later in the day(waiting on a pizza right now:D) and if I run into any problems I'll pm you, ok?

    I had this example in my dropbox using the clamp:

    Clamp mouse cusor

    So, I ran the example, I looked at the code, and I still don't get it.... What exactly is clamp suppose to do? Sorry for being dumb.

  • clamp(x, lower, upper)

    Return lower if x is less than lower, upper if x is greater than upper, else return x.

    clamp(5,2,10)=5

    clamp(1,2,10)=2

    clamp(12,2,10)=10

    If you want x is between 10 and 15, you'll use clamp(x,10,15)

  • If you look at the numbers in the middle of the screen, you'll see the actual mouse.x and mouse.y coordinates and the clamped mouse.x and mouse.y coordinates..

    Clamp prevents a value to go above and below specified values..

    This example was made to always keep the "cursor" within the play-area..

  • Ahhhh, if I try to go outside the layout, now I get it. Ok, thank you.

    Yeah MadSpy, I checked the manual and read that part the second LittleStain mentioned clamp, and I concluded that that phrase is the most ambiguous/nonexplicative piece of ****** there ever was..... I don't know, I guess my brain just isn't wired that way....

  • Hehe, I did it guys, yessss!!!:D I still have to create(or find) a decent light sprite, the one I have at the moment is just a stand in, but other then that I have achieved pretty much exactly what I wanted. I didn't even have to use clamp, the blend mode-source atop and adding another layer with force own texture was enough.

    You can check how it turned here.

    So thank you very much once again LittleStain , MadSpy .

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