Unconnected's Recent Forum Activity

  • I didn't think to test it in other browsers, should have been my first though. I am glad you brought that up.

    I use Firefox and Chrome at the same thing for different tasks. It prevents me from losing all of my tabs and log-ins when a browser crash occurs. So I usually have 6+ tabs open on Firefox and 2 or 3 tabs open at once on Chrome. I use Edge to test/debug to have faster loading and eliminate the risk of losing my Firefox/Chrome tabs when I accidentally make a bad loop.

    I did test in Firefox 48.0.1, Chrome 52.02743.116 m (64-bit) and I couldn't cause the problem to happen.

    So the problem seems to be in Edge for me.

    Edge 38.14393.0.0

    EdgeHTML 14.14393

    I put both Edge and HTML versions for Edge. Mainly because I have never seen a program with a version and a language version. So I assumed both would be needed if anybody were to try to duplicate this.

    Windows Pro 64-bit version 1607

  • It was a full project but it still does it in an empty project with 'ScrollTo' and '8Direction' on an object. Nothing else.

    It has something to do with the keyboard.

    I added on-screen buttons and it doesn't do it with Mouse click or touch, but it still does it with key press during the same session.

    Since nobody else seemed to have brought this up it is probably just my configuration, I'm not worrying about it anymore unless it becomes an issue when exported.

  • I have an object that only has 'ScrollTo' and '8Direction' on it.

    I have

    Directions: set to '8 Directions'

    Set Angle: Set to 'No'

    Default Control: Set to 'Yes'

    Initial State: Set to 'Enabled'

    The object is supposed to stop moving when the arrow key is released. Sometimes after I release an arrow the object keeps moving for what seems like forever, and sometimes it just moves for a few seconds before it stops. If I tap any arrow key while it is moving on it's own it will stop moving. Also when I change directions by pressing/releasing a second arrow it sometimes goes straight for a small distance before adjusting it's direction, and sometimes it doesn't change directions at all. It will also get stuck going at an angle with no keys being held.

    This is also happening when I removed behaviors and only had events that adjusted the objects Self.X or Self.Y while an arrow key is being held.

    Right Arrow Down: Self.X + 6

    Left Arrow Down: Self.X - 6

    ...etc

    When a key is pressed it starts acting instantly, but it is acting like there is a lag between key being held and key being released or it isn't detecting it.

    What could be causing this since there is no other objects or events interfering or associated with the object I am moving? This gave me problems in a large project, but it is also happens in an empty project.

    I don't have a bad keyboard, I would have noticed it when typing or using other software.

    I have Release 233 (64-Bit)

    I need to know what could be causing this and a solution if possible.

  • I don't fully understand

    "You did't change that '0.3' each tick, and therefor you got one value in return."

    I tried litetween before I posted this post. 'Time Scale' seemed to be interfering with it. I couldn't find anything in the manual or post about 'Time Scale' or "Delta Time'. I got it to work correctly but there was a delay in the 'Time Scale' variable change and I can't have that. The change has to happen instantly.

    I understand how lerp works mathematically. It is actually very simple. It takes two values and finds the difference using a 0>1 number as a percent. 0.5 will take 50% off of the remaining difference until it can't any more. 100, 50, 25, 12.5 , 6.25, 3.125....etc

    lerp(50, 800, 0.3) is only returning one value no matter where I put it.

    The only logical thought I came up with is it is running lerp correctly but since it isn't getting a reference to the object itself it is always returning the same value.

    I had it under a variable = 1 condition with and without 'Every Tick'

    I had it by itself with no Condition with and without an 'Every Tick'

    I am using 'Set Size' where it sets width and height at the same time.

    I even tried doing 'Set Width' and 'Set Height' individually and it is only returning one value.

    It just isn't working, it always returns one value.

    I understand lerp(Object.Width, 800, 0.3) never reaches it's target.

    It is why I put in a condition to fix it.

    I've spent way to much time trying to make it work.

    What I did made it work and it looks correctly when adjusting it's size and position.

    I had to do this with "Set Position" as well.

    I will gladly fix what I have if I can find an example Capx or if someone can point out why lerp(50, 800, 0.3) isn't working.

    I can't find an example of someone not placing the first lerp value of something related to the object. The first lerp value is always object.X or object.Y in all of the examples I have found. I also can't find an example of someone using lerp to change the size of an object. I can only assume it is similar to moving an object with lerp.

  • I found my error...

    On lerp I had:

    lerp(50, 800, 0.3)

    I changed it to:

    lerp(Object.Width, 800, 0.3)

    I think it was interfering with itself, I should have noticed that rather quickly... opps.

  • That is what I have been trying to do. For some reason I am having trouble with it. Instead of going to it's expanded size it treats the third number as a % (as it should) but it only moves once. As in if I have it at 0.5(or 0.1) it instantly makes the object 50%(or 10%) of the size it is supposed to be and it stops expanding. I thought maybe Time Scale was effecting it because I have Time Scale set to 0 when this is happening. I disabled the trigger to set Time Scale to 0. When Time Scale is 1 it still does the same.

    I am sure it is the way I structured the events. I am needing an example of a box sprite expanding in size when clicked and contracting back when clicked again, or the conditions that should be used. I wanted it to be a function so it skips unneeded events unless clicked. I thought that may be the reason so I tried otherwise and it acts the same. It needs to be unaffected by Delta Time.

    Thank you.

  • I will probably have to use width and height and adjust the box's position when it is scaling down. I wish there was an easier way though.

  • No. I know of that, the box isn't gonna be in the middle of the screen. It would look correct when it expands out but when it contracts it won't look correct. There would be a lag on the side that is closest to the edge of the Layout.

  • I have a small 50 x 50 box (Scaled down) and when it is tapped it's position should stay the same and it should adjust in size to fit the Viewport, or seemingly do so. When the player is done the box should adjust back to it's original size and position. I only know how to move boxes and adjust width equally on both sided as well as height. I am unaware of how to adjust each side of the square according to it's potion within the Viewport. I was going to use Lerp for this, but I just don't know what to use for the box's edge or points. I am aware of Viewport Top, Left, Right, Bottom.

    The box is just a solid color.

  • I am wanting to make a time based upgrade system for a game. I would like to know how, or be pointed into the right direction on how to make a timer that will seemingly count even if game is closed and can tell if device time has been changed.

    I know you can do this by comparing the device time during game play and at start of game play and change accordingly, but not sure how to accomplish this.

    Example: An hour timer is started. Player leaves game and does whatever with device. Player comes back in 55 minutes and timer has 5 minutes left. How do I achieve this and how do I detect if someone changed device time and/or daylight savings time clock change took place?

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • Okay thank you for your time and the plugin. Both were very useful.

  • Thanks I will use this, it seems better anyway.

    I still need to know how to call XDK Plugins for later when/if I come across this again.

Unconnected's avatar

Unconnected

Member since 6 Apr, 2016

Twitter
Unconnected has 1 followers

Trophy Case

  • 8-Year Club
  • Forum Contributor Made 100 posts in the forums
  • Coach One of your tutorials has over 1,000 readers
  • RTFM Read the fabulous manual
  • Email Verified

Progress

12/44
How to earn trophies