dop2000's Forum Posts

  • You can use lerp and unlerp functions. For example:

    Set bullet scale to lerp(1, 0.5, distance(bullet.x, bullet.y, player.x, player.y)/600)

    At 300px from the player bullet scale will be 0.75, at 600px the scale will be 0.5

    .

    Or another example with unlerp and based on Y coordinate:

    Set bullet scale to unlerp(-100, 500, bullet.y)

    As the bullet is traveling from y=500 to y=-100, its scale change from 1 to 0.

    .

    Or simply use Sine/Tween behavior to change bullet size over time.

  • You can write multiple JSON strings to a file, separated with newline (or any other custom character or tag).

    Then parse them with tokenat(), for example tokenat(filecontent, 2, newline) is the line number 3.

    Or you can read them in a loop:

    Repeat tokencount(filecontent, newline)-1
    	Create sprite
    	Sprite load from JSON tokenat(filecontent, loopindex, newline)
    
  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • Text object is not rendered if it's fully off-screen, or invisible or has opacity=0. So if you need to access TextHeight and TextWidth properties, at least a small portion of it needs to be on screen and visible.

  • Yes, you can pick windows with x>ViewportLeft(layer)+Window.width/2 and x<ViewportRight(layer)-Window.width/2

    (assuming that the origin image point is in the center of window sprite)

    And then pick random instance from them.

  • You can draw two rectangles and four circles.

  • You do not have permission to view this post

  • Try expanding (stretching) the window, there should be more fields below, where you specify key name and password.

    Also, you should post this in C3 forum.

  • The video you posted is not very useful. It doesn't show player controls, just some dudes running..

    I assumed your question was about controls - how to recognize rapid pressing of two buttons.

    If you are asking how to move your character with TileMovement behavior, you need to provide more information. Should the character move 1 tile per each button press? Should the speed increase the faster you are pressing buttons?

  • Are they susceptible to browser data clearing?

    That's what I asked you :) I didn't test it, but I believe clearing Chrome cache will not affect NWJS storage.

    stackoverflow.com/questions/25143532/node-webkit-clear-cache

    "NWJS Write text file" action to save the data, how different is it from saving data using Local Storage?

    It's like saving a text file with Notepad - you can save any data with any filename in any folder.

  • You need to have at least one instance of the object on any layout to set default instance variable value.

    You can create an unused layout and keep such instances there.

  • Are you sure clearing cache in Chrome deletes NWJS local storage files?

    You can simply write any data you want to disk files using "NWJS Write text file" action, and read it back with NWJS.ReadFile() expression.

  • This is pretty odd. Can you reproduce the problem in a blank project? Can you share your project file?

  • Ok, you can find my email here.

  • Can you post your project file?