dop2000's Recent Forum Activity

  • You do not have permission to view this post

  • lepr like that is supposed to be run continuously, on every tick.

    "On key pressed" is a triggered event, it happens once, that's why your object only moves a tiny bit. Besides, you must use dt in lerp expression if you want it to work correctly at different framerates.

    You can change your code like this:

    On Q pressed: Set Action to true
    
    System is Action: dot set position to (lerp.....
    

    But you also need the way to stop the lerp when the dot reaches the player, otherwise it will be chasing it forever.

    I suggest using MoveTo or Tween behavior instead, it will be much easier.

  • A) Input lag is 2 frames at 60hz. I conclude this by storing the previous mouse coordinates one frame back and extrapolating forward 2x that distance.

    Can you share this test project?

  • Hitdistance would return 0 when the ray doesn't hit anything. Check that there are in fact obstacles and that you've configured them correctly in LOS behavior.

    Or maybe the ray hits the player object itself, or some other object attached to the player.

    It's difficult to speculate without the project file.

  • How do you know it doesn't work? The expressions look correct to me.

    Instead of raycasting, try spawning a test sprite at those coordinates and check if it appears in the expected location.

  • I am not sure what you mean. I just tested (sprite set position to mouse.x/y) and the lag is barely noticeable at 60 fps. At higher fps there is practically no lag at all.

    In any case the lag can't be more than the duration of one frame, 0.016s at 60 fps.

    Does it happen in a blank project?

  • That's not a good solution, because if you press+release W key repeatedly roughly once per second, the speed will still increase.

    If you need to increase the speed by 10 for every second the key is held continuously, you can do this:

    Global variable startTime=0
    
    On W pressed: Set startTime to time
    
    On W released: Set startTime to 0
    
    On every tick
    startTime>0 : Set speed to initialSpeed + int(startTime)*10
    

    Or use the Timer behavior. On W pressed start a repeating timer for 1 second. On released - stop the timer. In "On timer" event increase the speed.

  • You need to check out a few examples and tutorials. In C3 you can create big and complex games 100% with events. Scripting is rarely needed.

    There are 3 different ways you can pick up an instance by UID:

    Sprite/Family: Pick by unique ID

    System: Pick by evaluate

    System: Pick by comparison

    .

    Can you explain the task? You need to spawn a specific type of bullet based on .. what?

  • It would be necessary that when the triangle rotates even hypothetically 180 degrees, it should be able to communicate its speed to continue its course.

    Can you explain what you mean? If it travels North, and then rotates 90 degrees clockwise, should it now travel West? Or continue flying North, but sideways?

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • I believe this may be possible in a web game, if both applications are hosted on the same server. You need to set the same "uniqueId" for both projects in project.c3proj file. Then they both will share the same storage.

  • Your event runs on every tick, which means 60 times per second or even faster. The easiest solution is to add another condition like "Every 0.5 second" to it.

    Also, instead of destroying and spawning the arrow all the time, simply move it to the next option.

  • Try changing the file extension. If you set the filename to something like "myArray.dat", it should not open automatically.

    You can also try "Browser Invoke Download of String" action to download Array.AsJSON

dop2000's avatar

dop2000

Member since 26 May, 2016

Twitter
dop2000 has 256 followers

Connect with dop2000

Trophy Case

  • 8-Year Club
  • Entrepreneur Sold something in the asset store
  • Jupiter Mission Supports Gordon's mission to Jupiter
  • 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
  • Forum Wizard Made 5,000 posts in the forums
  • Forum Unicorn Made 10,000 posts in the forums
  • x5
    Popular Game One of your games has over 1,000 players
  • x2
    Coach One of your tutorials has over 1,000 readers
  • Educator One of your tutorials has over 10,000 readers
  • Regular Visitor Visited Construct.net 7 days in a row
  • Steady Visitor Visited Construct.net 30 days in a row
  • Enduring Visitor Visited Construct.net 90 days in a row
  • Unrelenting Visitor Visited Construct.net 180 days in a row
  • Continuous Visitor Visited Construct.net 365 days in a row
  • RTFM Read the fabulous manual
  • x3
    Quick Draw First 5 people to up-vote a new Construct 3 release
  • x13
    Great Comment One of your comments gets 3 upvotes
  • Delicious Comment One of your comments gets 10 upvotes
  • Email Verified

Progress

28/44
How to earn trophies