Sargas's Forum Posts

  • marcellolima That would be: angle(0, 0, Gamepad.Axis(1, 0), Gamepad.Axis(1, 1))

  • Thanks, but that's pretty much exactly what I did on my own, I need to do a lot more than that.

  • In StarCraft II you can hold the middle mouse button to drag the camera, and you can also choose different drag speeds. Can this camera/mouse behavior be replicated in C2? All i was able to do was this: CAPX, but is nowhere near what I need =/

    Thanks in advance =)

  • AllanR Thank =), but that's what I already managed to do. If you see my capx, you'll see it has the same behavior =)

    By inverted I mean you can either drag the terrain or the camera. So in one mode; dragging down, makes the camera go up, and in another mode, the camera goes down.

    Just to be clear I need the camera drag to work like the camera on StarCraft 2 or Heroes of the Storm.

  • LittleStain there has to be a speed and invert option.

    Sunny87 Well, yeah, and that would be what I told I had already done

    At this point i'm worried the amount of answers on this post will dissuade people to actually enter and give a real answer. I appreciate the intention, but maybe don't post a random guess when people are asking for help =/

  • Sunny87 The template uses the mouse on border kind of movement. it's of no use to me =(

    LittleStain Because that do not behave like I want to, I need to DRAG the camera, not PAN the camera =(

  • hey there, this is what i would do.

    You need 1 variable to store the lerping ammunt, let call this one "num".

    So when the player is not mirrored (going right), you add 0.1 to num as long as it is < 1.

    when the player is mirrored (going left), you substract 0.1 from num, as long as it is > 0.

    and then you scroll.X to: lerp( player.X - 40 , player.X + 40 , num)

    I hope it's what you wanted. There is no reason this should flicker, and using lerp every thick should not be a problem either.

  • Hey everyone =)

    I've been wondering how could I properly drag the camera around, like many Moba or RTS games do.

    I've been trying to do this for a while. Best I could come up with was to store Mouse.Absolute coordinates and Scroll coordinates on 4 variables, and then use those in "Old Scroll Coordinates + (Old Mouse.Absolute Coordinates - Current Mouse.Absolute Coordinates)" which gives me an ok result.

    CAPX

    My main complain with this way of doing it, is that I cannot control the drag speed, nor am I able to invert it if needed.

    Any help is always appreciated =)

  • menasheh To do the same thing for the right stick it would be angle(0,0,Gamepad.Axis(0, 2), Gamepad.Axis(0, 3))

  • thanks, but that part I had already covered =)

    LittleStain, hey that's it! i see I wasn't so far off xP. Thanks once again =)

  • Hello!

    I wan't to make a tank type thing, but i'm having trouble with something i'm guessing has to be really simple, but i can't seem to solve it.

    The cannon moves freely. But when i'm moving the base and not the cannon, I want it to maintain the angle it had, relative to the angle of the base.

    https://dl.dropboxusercontent.com/u/206 ... ngles.capx

    It's like what the pin behavior does, but i wanna know the math =(

  • LittleStain ok, now that i've seen it done, i have to admit it's really damn simple =/, but it's a lot more "math minded" than i'm used to. I send you a tasty digital cookie with all my appreciation! your solution is amazing.

    Thanks for helping me ^^!!

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • LittleStain if it wasn't hard, or if I was able to, i wouldn't be asking for help =(

    Do you know how to apply the logic to what I need? could you help me please?

  • LittleStain as a matter of fact, I had studied those post extensively, but they don't work the way i need to. In my game there can be 2 to 4 players and I haven't found a way to adapt those examples to my current needs =(

  • lennaert thanks, but that's really not what I need. I'm looking for a way to dynamically zoom in and out with the character change their distances to each other, the scroll to behavior has nothing to do with that, it's used to tell the game where to center the camera. thanks anyway =)