winkr7's Forum Posts

  • Hello;

    After I create a sprite with the behavior fade I can set the time to fade and a few other things. But I can't set Destroy (at end of fade). I should be able to set this to true or false right?

    thanks for your time.

    yours

    winkr7

    Tagged:

  • Your question is too big. I would start by puting 3 sprites on the screen, one called friend1 and enemy1,enemy2. If you click on an enemy flash the enemy if you click on a friend do nothing.

    If you get that far you have made a start.

  • If you mean you can't select them once you start the game then are you using something like drag and drop?

    For some things you need "enable collisons" to be checked for the sprite--you might try that.

    If you mean you can't select them in layout editor I am not sure.

  • some times you have to use for each to get all the stuff in the SOL, sometimes you don't. I usually just use the for each statement to be sure, but perhaps that is wasting time. Perhaps a tutorial on when you don't need the for each would be good.

    For example if a single sprite scedules a TIMER event for itself in the future if more than one sprite scedules that event you are going to have multiple sprites in the event not just one if they landed in the same tic.

  • you might want to look touch.x(index) not just touch.x. The coordinates are for that index layer.

  • The navier stokes equation is how this is usually done. There are some javascript versions. This may be a bit much but it also might give you some ideas.

    github.com/topics/fluid-simulation

  • The easiest way is to put all arrows into two families, arrowFirst, ArrowSecond. Then select your first arrow as arrowFirst and the second as arrowSecond and you can add and compare etc.

    yours

    Winkr7

  • When you calculate the path for a player turn off solid for that player only. When you move the player (use the new move to behavior not the one built into pathfinding) you have to handle the collision with solid by recalculating the path. You will need to recalculate the path and the obstacle map every .1 seconds or so but with only 3 guys you can do it.

    At least that is how I would start.

    yours

    winkr7

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • I would like to know how to do this too.

    yours

    winkr7

  • scroll doesn't effect anything but where the view is centered--the coordinates of things on a layout are not effected by scroll.

    The best way to understand scroll and to build your programming skill is to just deal with a few sprites at a time. Start a new project, put some sprites on a layout set one of them to drag and drop-- drag it around-- then set it to scroll and drag it around. You are best off understanding each behavior with just a few things in the project before you start combining them into a real game.

    Just my 2 cents.

    yours

    winkr7

  • If you set the player sprite with the scroll behavior it will center it on the screen and the background will move behind it. You can do this with any movement behavior.

    yours

    winkr7

  • Colludium

    thanks lots. So the inputs are still from 0 to 100 (except damping which is 0 to 1)?

    yours

    winkr7

  • Hello Colludium;

    The viscous behavior is supposed to clipped to 100 is that correct? If I set it to 590 it crashes the elastic demo.

    -> ctrl: LFJS Turn Elastic behavior ON for spawning

    // only added these two lines

    -> ctrl: LFJS Turn Viscous behavior ON for spawning

    -> ctrl: LFJS Particle system viscous strength: 590

    // end addition

    the console value is:

    ncaught (in promise) RuntimeError: float unrepresentable in integer range

    at wasm-function[513]:0x2aa3e

    at wasm-function[559]:0x3605e

    at wasm-function[445]:0x20694

    at wasm-function[94]:0x54b3

    You could set up a test program that walks through all the possible (and some not possible) values for all the variables and see what crashes it.

    thanks for your time

    yours

    winrk7

  • Colludium;

    Thanks for the quick response. It doesn't crash now, but the parameter doesn't seem to do anything. I assume it is clamped between 0 and 1.

    Still, it is best not to crash. I have the feeling they left out the division by zero checks and reasonable value checks in the interest of speed. Do I get the clamp values from the google site?

    thanks again.

    yours

    winkr7

  • Colludium;

    Hello, I found another problem.

    I am still using the elastic example. If I adjust the particle system damping parameter it runs fine with a value of 6 and bellow with interesting effects at 6. If I set it to 7 or above I get this error on the console:

    Uncaught (in promise) RuntimeError: float unrepresentable in integer range

    at wasm-function[513]:0x2aa3e

    at wasm-function[559]:0x3605e

    at wasm-function[445]:0x20694

    at wasm-function[94]:0x54b3

    at _0x3c5115.<computed> (blob:https://preview.construct.net/062ea27e-a403-4169-a558-2188caa1a6ee:1:76825)

    at _0x3442af.<computed>.<computed> [as Step] (blob:https://preview.construct.net/062ea27e-a403-4169-a558-2188caa1a6ee:1:132909)

    at LFJSInstance.Tick (blob:https://preview.construct.net/af3aadf6-b18d-4ea5-913e-69960c163866:2360:26)

    at C3.Runtime._BehaviorTick (https://editor.construct.net/r171-3/preview/c3/runtime.js:1:25340)

    at C3.Runtime.Step (https://editor.construct.net/r171-3/preview/c3/runtime.js:1:26912)

    at async C3.Runtime.Tick (https://editor.construct.net/r171-3/preview/c3/runtime.js:1:25977)

    ==================================================================================================

    Here is the exact code I am running--I am only changing line 4.

    + System: On start of layout

    -> ctrl: LFJS World: fixed step rate

    -> ctrl: LFJS Set World Step 30 steps/sec FPS

    -> ctrl: LFJS Particle system damping: 7

    -> ctrl: LFJS Set particle as the particle object

    // The Elastic or Spring flags needs to be set before spawn otherwise they cannot be set later.

    When the particles are created they are bound to their neighbors.

    // This is all the Liquidfun documentation says about Elastic particles:

    Elastic particles deform and may also bounce when they collide with rigid bodies.

    From the cpp code, Elastic particles are connected in triads, or 3s.

    -> ctrl: LFJS Turn Elastic behavior ON for spawning

    -> ctrl: LFJS Set spawn color to rgba(250,140,30,255)

    -> ctrl: LFJS Create particle "tag", shape box at 160, 300, width 200, height 200, angle 0

    // This is what the documentation says about Spring particles:

    Spring particles produce the effect of being attached to one another, as by a

    spring. Particles are "connected" in pairs. Each particle is connected to the

    one that was closest to it at time of creation. Once paired, particles do not

    change "partners." The farther an external force pulls them from one another,

    the greater the power with which they collide when that external force is

    removed. No matter how far particles get from one another, the connection

    between them does not "snap."

    -> ctrl: LFJS Turn Spring behavior ON for spawning

    -> ctrl: LFJS Set spawn color to rgba(100,220,60,255)

    -> ctrl: LFJS Create particle "tag2", shape box at 440, 300, width 200, height 200, angle 0

    thanks for your time.

    winkr7