ome6a1717's Forum Posts

  • Valerien - you sir, are brilliant. Thank you!

  • Valerien - thanks. I tried your code, but instead of checking the x and y position of the camera, I checked the distance of the camera and player to see if it's less than 7 pixels, and if so, stop. It helps the problem, but doesn't exactly fix it perfectly. I understand the lerp function makes the camera always moving, what I don't understand is why the parallax only moves at an integer base instead of a float base when the camera is moving.

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • I have a camera object with "ScrollTo" on it, and multiple background layers that are parallaxing.

    My event is something like this:

    EVERY TICK
    Camera > Set position to lerp(Camera.X, Player.X, 3*dt), lerp(Camera.Y, Player.Y, 5*dt).  [/code:28ako3ze]
    
    This works how I want it to, but for some reason if I jump ahead and stop, as the camera lerps closer and closer to the player, the parallax layers seem to only move a single pixel at a time instead of a float (ie 0.4, or 0.01), making it feel weird and choppy.  Is this just because of the way lerp works (since it's never actually reaching its destination)?
    
    Slightly off topic it seems to do this when changing opacity as well.
    
    Any insight would be greatly appreciated.
  • newt - If I understand what you're saying, it wouldn't actually need to pick an instance. It would just be nice to say "run this action ONCE while the event above is true" without having complications from multiple instances of 1 object running the same event. Setting an instance variable as a "trigger once" creates the problem of "Ok, now it = 1 so it will only trigger once while it is 0 ... where do I set it back to 0, and when?"

    It's not so much a feature as it is a time saver

  • Over the past couple days, I've been playing around with a new game. I've found some interesting things that I didn't know about before; mainly Trigger Once. I've always had issues in the past using this with multiple instances, but have finally realized that if 2 instances do something at the same exact time, because the trigger once is global it will generally break the event.

    So my request, or rather inquiry, is this; is there a way to get a "trigger once" for a sprite event instead of a system event? I know you can do something like this to create a proper trigger once per instance:

    If InstanceVar = 0

    Do something and Set InstanceVar to 1

    This will always work, but it requires more lines of code, instance variables, and can certainly certain complicate code that is much more complex.

    I'm imagining "For Each" is a solution, but everytime I try and use it, it never works like I want it to.

    I'm curious of everyone else's thought on this.

  • Ashley

    Wonderful, thank you!

  • We've been trying to do a sort of push effect similar to: "Set Vector Y to -500" only for Vector X. No matter what number we set the Vector X to, it pushes the platform object the same number of pixels regardless. Is this a bug, or are we not understanding how Construct handles Vector X?

  • Arima - Thank you! We were freaking out a bit...good to know it's intended!

  • Aphrodite - it does say webgl- is it a node-webkit bug? or something with C2?

  • Update - we've ruled out of sort of leak, it is confirmed to add memory every time a new texture is loaded. Once everything is loaded, the memory does not increase.

  • We're releasing our game on Steam shortly, and we've noticed a very unfortunate thing - when loading different layouts, it is increasing the memory usage in the task manager (it seems to be for any sprites/tiles that have not been loaded into the game yet). When going to a new layout, it doesn't seem to do any garbage collecting for the previously loaded objects.

    I've checked my code and object count and didn't find anything. Also, of the few objects that are global, none of them are being created ever (so there is no build up of objects). I've even tried deleting most of my code and switching layouts - still nothing. We are using node-webkit.

  • I've also noticed something similar. Like lolpaca said, looks perfect in preview but shows up in export forcing me to roll back to the stable release. (I believe this was present in 169, as well). It might be worth noting my game is NOT a pixel based game.

  • anata - you are brilliant. Thank you!

  • I am currently traveling and put construct on my laptop. Upon doing a bunch of things in my game, I undoubtedly noticed even though I said to opt out of the beta, it had been using the beta all along. Upon doing a build for testing, people noticed random issues that wasn't in the previous build (tile seams, animation bugs, etc).

    Is there a way to edit something in the capx to changed the version it was saved in so I can keep my changes on my file but use the stable release?

  • I'm trying to figure out how to pick all the instances NOT met in the condition:

    If Mouse is overlapping MenuItem
    Set MenuItem frame 1
    
    Pick All Other Instances
    

    Set MenuItem frame 0[/code:1ny6tj49]

    Something like this. My usual non-coding way of doing it would be to set an instance variable for each individual one and do:

    If MenuItem Var = 1
    

    Set Frame to 1

    >>>>>If Menu Item Var 2

    >>>>>If Menu Item Var 3

    >>>>>If Menu Item Var 4

    >>>>>If Menu Item Var 5

    >>>>>If Menu Item Var 6

    >>>>>If Menu Item Var 7

    >>>>>If Menu Item Var 8

    >>>>>>>>>>Set Frame to 0[/code:1ny6tj49]

    But this gets incredibly messy. Am I over-complicating this?