Unconnected's Forum Posts

  • I logged off already. Can't check any capx soon. I wasn't expecting a reply so soon.. I was thinking camera when I posted this, wasn't thinking of camera object. I can probably take 2/5th of the window size and Lerp it using the edge of the Layout somehow. I'm sure I will need an example though. I just found out how to use lerp today and not 100% sure the different ways it can be applied. I actually already had events to do lerp in place. Glad I can remove them. I won't be able to reply or view capx to soon. Didn't mean to start conversation then run... Sorry about that, and Thanks for the help.

  • You are right about the WindowWidth. It keeps the object in middle of the Window and if the Window edge touches the Layout Edge the camera stops. I get it now, I wasn't thinking correctly. I have to set up variables and then limit the objects movement with the variables.

    One Question still remains. I have a slide on the camera. I don't want it to suddenly stop, Is there a way to prevent directional input from the player? A soft limit instead of a hard limit?

    Thanks.

  • I didn't think of using ESC. Will be helpful. Thanks.

  • My problem is the camera. I want the camera object to stop moving at the same time the view-port edge hits the edge of the Layout. Currently the camera stops when the view-port edge gets to the edge of the layout and the camera object keeps going. Once I start moving the camera object in the opposite direction there is a small lag before the camera starts moving with the camera object again.

    Is there a simple way to fix this? The camera isn't attached to a player object. The "Player" of the game is controlling the hidden camera object at all times. The only way I thought of fixing this was having a camera object mimic the movement of a hidden player object, but at a different rate of speed than the player object. If both objects start at the same spot in the middle of the layout, then no matter what path is taken they will always be on top of each other in the middle of the layout. I know this will cause the distance between them to get rather large depending on the size of the layout. I am going to defeat that using layout width/height in the formula. I just need a simple sample to have different speeds, I can do the harder math parts to fix the gap.

    I would like an easier solution, but if one isn't available I just need an example on how to have an object mimic another object at a different rate of speed. I am not talking following the exact same path, just mimicking 8 way movement.

    Is it possible to just set a hard x and hard y limit? Camera Object can only move between X20 - X2000 and Y20 - Y2000? If so I will incorporate Layout Scale to help soften the limit.

    Thanks in advance.

  • Can someone explain the difference to me a bit better? I thought variables didn't reset unless you tell them too. Static means you can change them and they stay to what you changed them too. What is the point of having a variable as a Constant if I never change it and the user won't have access to it anyway?

    I have a few Variables that are Static and I never change them and they never get changed.

    What am I missing on this?

  • I did the math wrong then...

    What I did was put 12 into 64 five times (60) with 4 left over.

    I thought my answers seemed off though.

    Basically it subtracts 64 from TileXValue until it can't anymore and what is left is the answer?

    So it means...

    64 will go into 12 Zero times, since there is 12 left over the answer is 12.

    so then

    64 will go into 68 One Time with 4 left over. So the answer would be 4.

    Thanks for your time.

  • Is there a way to prevent Autocomplete (autofill) from inserting the highlighted suggestion when pressing Enter/Return/Space bar when entering a Value?

    Example:

    ---Set Value---

    Variable: PlayerName

    Value: PlayerTeam

    When trying to enter "Player" into Value and pressing "Enter key" to confirm or "Space Bar" for a space, it will automatically insert an object, family, etc that starts with "Player", like "PlayerTeam" or "PlayerObject".

    I know this is a small issue. I couldn't find it in settings.

    I am not looking to disable the autocomplete feature, just to prevent it from auto inserting the top suggestion on the press of Enter/Return/Space Bar key. It sometimes causes issues when I don't catch it right away.

  • Oh wow.. Can't believe I didn't see that in Layer properties... Thanks.

  • Can someone tell me if this is correct?

    If TileXValue = 12

    TileXValue >= 0 ? (TileXValue - TileXValue%64) : (TileXValue - TileXValue%64) -64

    12 >= 0 Then (12 - 4) Else (12 - 4) - 64

    12 >= 0 Then 8 Else -56

    So the answer would be 8?

  • I am aware of parallax and the anchor function, the problem is using scale for zoom.

    I am just wanting to be able to keep text in the same spot on the screen when I zoom in and back out.

    Example would be 5,5 from the top left corner of the viewport and have it ignore scale.

    As of right now I have four layers. Three need to be zoomed in/out while the 4th(Hud) needs to ignore scale. Is there a way to scale all layers at once excluding one or am I going to have to scale three layers one by one with events. Will this cause a visual issue when zooming, like a small lag between layer scaling?

    Perhaps there is another way of making text stay in a specific spot on the viewport that ignores scale?

    I have never actually used anchor for an object before, I assume it won't ignore scale. Is there a way to make it ignore scale? Will that just be a layer problem like the text?

  • I will agree, it is pretty neat.

  • TileXValue >= 0 ? (TileXValue - TileXValue%64) : (TileXValue - TileXValue%64) -64

    TileYValue >= 0 ? (TileYValue - TileYValue%64) +64 : (TileYValue - TileYValue%64)

    This is what I was talking about. I believe it rounds up by 64s. Can someone explain this?

    I would like to know what the "%" symbol does. I assume it has to do with percent, but in programming symbols don't always mean what they mean to normal everyday people.

    To me it looks like a If-Then-Else, but each one is in a "Value" field for a "Set Value".

    I didn't know this could be done.

    What the above formulas are seemingly doing is rounding up to the nearest 64, and they have a built in offset.

    Would "ceil(x/64)*64" be similar (except for the offset)?

    Why would somebody complicate a formula like this, or am I misunderstanding the longer formula?

  • The example is pretty neat. I am not sure exactly how it applies to what was asked though. I will hold on to it and reference it for another project at a later time. I understood what you meant by using a tile-map. Since it is the same angle I could just use a tile-map to apply the images.

  • I may be adding nodes to the map. I may be able to apply them with nodes since it is the same image tiled at the same angle. I will look at the example. Thanks

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • From my understandings if a group is activated but not in use, it checks the main event and skips it's sub events.

    If a group is deactivated is it skipped on every tick or is the main event analyzed and ignored?

    What about Functions? is it skipped on ticks unless called or analyzed as well?

    I will most likely adopt Functions because it uses less events to call than to activate/deactivate a group and they seem like they act faster when called.