jobel's Recent Forum Activity

  • Here's a different issue, but its the same problem...as my game starts to get closer to being finished, adding lots of options for different controls and I start programming more complex AI I've been running into this issue a lot. How to add an OR to a string of ANDs? I know it can't be done, but shy of duplicating code what are the expert Construct users doing?

    like here, how do I add an OR to this? or rather how do I work around this? if I create a subevent then it won't bounce out to the else. (I have a few else's with the final else being an error sound)

  • I have some OR block code. but when I use the mouse I have to pick which object I clicked so I need to add ANDs but you can't mix AND and ORs

    so I did it with 2 different events, but its not working. how is this done without repeating the code for a mouse specific event?

    dropbox.com/s/zq5lp8zpl91cuuv/mouseCapClick.c3p

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • closing the tab and reopening a new tab seemed to reset it and fix the issue.

    it may seem obvious, but when the problem started I closed all projects, then closed chrome, reopened chrome and it was still happening. My Chrome is set to restore any open tabs, so somehow the TAB settings were saved, it wasn't until I closed and started a new TAB that it worked again.

  • this started last night... any idea how I fix this?? It's like the mouse is offset! If I zoom way in, it doesn't happen. Seems like its something to do with the zoom.

    I can't use the editor like this!

  • R0J0hound this makes sense and I love that idea, maybe I could put CustomMovement on the camera? although I feel like it could get unwieldly.

  • I will test it a bit more, I'm not sure what the solution is...

    it definitely works better as a gamepad function. overloading the mouse with the direction and a "look" might just be too much

  • oosyrag - I just tried it, not thinking that is quite right. but thanks for the suggestion.

    the idea is to have the camera "behaving normally" when the player is just dealing with the things relatively to the center of the screen. And to only do the extended camera when they need to see something on the edge of the screen. I only want that to happen in a deliberate sense (i.e the player is really trying to stay far away from some object, but they still want to see it).

    The problem happens when transitioning between these two modes since the main camera has a lerp on it.

  • so far the best setting is MainCam 1.0 and lookCam 0.25 MaxDist 200

    still it might make a player throw up, so without figuring a way to make this a smoother movement I don't know if this is a good idea!

  • maybe this won't work. It can be pretty jarring (at times) no matter what I make the values. The problem is the main cam is lerping.

    the main reason for this functionality is giving the player the ability to see things that are slightly off screen, with a "look" function. Since my player is pretty much always moving, maybe its a given that the camera will be janky.

  • after looking at this more, I think I can pinpoint where the camera starts to go wrong.

    if you are moving left and you scroll the mouse to the right edge and off again, it does the abrupt movement. I think it's because the mainCamera is trying to catch up to the player, then when the mouse goes to the edge, it jumps to the lookCam.

    it doesn't happen the other way (if you move left and look left) because the cam is behind the player or something along those lines... I can't quite figure it out! but I sort of understand it.

    I think I need to take into account the player's speed for the lerp value maybe?

    EDIT: oh its that clamp that is doing the really abrupt jump. but I think this is what I meant by needing an easing transition. its the maxdist that needs to be the max distance the player can be from the center of the screen (with regular cam). but when I set it to that value (around 200), then the camera is WAY too fast.

    EDIT2: so then I lowered the lookCam speed to 0.5 which helps a little. but still its wonky.

  • fyi for posting gifs:

    the format is like this:

    [img="https://imgur.com/c9WBKlG.gif"]

    or

    [img="https://media.giphy.com/media/xuXpbn/giphy.gif"]
  • Hi dop2000 sorry to call you out! but you helped me a while back with the Gamepad R-stick to modify the camera to look around.

    So now I'm trying something similar with the mouse. But I need some suggestions since the mouse is so different from the analog gamepad sticks.

    Since the mouse is always at a distance from the player (it determines the angle of the player) I pretty much always want the camera lerping to the player *and not "looking around"). I only want to "look" when the mouse is at the edge of the screen (like in an RTS game).

    The issue is, when the mouse goes to the edge of the screen and I start doing the "look"(and change the pointer to show it) there's an abrupt jump and vice versa when going away from the edge. Even if I change the lerp speed its still a little "vomity" for the player. It really has to be seamless because it can be triggered accidentally.

    So I think maybe there's a better way to do this? I've tried a few things but I'm a little stuck on coming up with a solution. Any suggestions? THANKS!

    dropbox.com/s/hatwal7zq4kiipd/LookCam_dop2000.c3p

    EDIT: it could be that I don't want to scroll back to the player after edging the screen. but then I run the risk of the "losing" the player not having them front and center. not really sure what to do. I don't know of any other games that do this. I play MOBAs that are similar, but their cameras are completely independent from the player so you can scroll around the entire map leaving your player completely off-screen (I don't want to do this).

jobel's avatar

jobel

Member since 27 Jul, 2013

Twitter
jobel has 8 followers

Connect with jobel

Trophy Case

  • 11-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
  • RTFM Read the fabulous manual
  • x4
    Great Comment One of your comments gets 3 upvotes
  • Email Verified

Progress

18/44
How to earn trophies