R0J0hound's Recent Forum Activity

  • I'd like to point out that you can simplify it by taking advantage of the way events work. When there are an equal number of Bean1's and Bean1shadow's then this will pair them.

    Every Tick:

    --Bean1shadow| set position to (Bean1.X, Bean1.Y+14)

    --Bean1shadow| set angle to Bean1.Angle

  • The blank event is just an artifact of converting my first example you can safely move the actions to the event above.

    I was noticing the jerky motion as well and found that if you remove "stop loop" from event 6 they move much smoother.

    It also goes smoother if you add a smaller value to "t" in event 5, of course you will have to increase the number in the "repeat" condition since the Sprite will be moving over more line segments.

  • If you double the height of the Text object you will see the text. It seems that if a word is wider than the text object then it is sent to the next line.

    I can only find a IE solution to provide a save as dialog to save the image. For now using the browser object to open ImageUrl and right-clicking save as is the simplest way that comes to mind.

  • trippy.

  • If for example full length is 200 then just always set the length to this:

    200 * health/100

    Or change 200 to whatever you want the max length to be.

  • The simplest way I have found is to decompose the spline path into a polyline and move along that line.

    Here I made it calculate the polyline as needed.

    /examples%209/catmullrom_constant_speed.capx

    https://www.dropbox.com/s/faf05eygw363j ... .capx?dl=0

    Note: It only works with positive speeds atm.

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • It will work on a moving object.

    Mouse.X-Sprite.X gives you the x position relative to the Sprite, same for the y.

    With the hotspot of the sprite set to "top left" you will get values between 0-50 for x and y.

    If all you want is the direction from the mouse to the center of the Sprite then you can use the angle() expression to get the angle:

    angle(Mouse.X, Mouse.Y, Sprite.X, Sprite.Y)

    With the physics behavior the angle expression isn't even needed as you can apply impulse toward a position.

    http://dl.dropbox.com/u/5426011/examples%208/kick.capx

  • The value <varies> basically just informs you that all the instances of that object don't have the same value. As a default when adding the variables you can set "rate" to 1 and "offset" to 0.

  • You can calculate it with the difference between the Mouse and Sprite locations.

    +On clicked on Sprite

    -set x_on_sprite to Mouse.X-Sprite.X

    -set y_on_sprite to Mouse.Y-Sprite.Y

    This is dependent on the Sprite's hotspot. If the hotspot is centered then x_on_sprite and y_on_sprite will be -25 to 25, but if the hotspot is top_left then they will be from 0 to 50.

  • I don't have a multi-touch device so I can't fully test this but here is an idea of how to distinguish between multiple touches. It uses sprites to keep track of the positions of the touches and what objects were initially touched.

    http://dl.dropbox.com/u/5426011/examples%208/multitouch.capx

    Edit: Since I can't test it I can't be sure but you may need to add a "for each Sprite" condition to the top of event 4.

  • Use can use the change in the mouse position to change the angle.

    ex:

    always:

    -add MouseX-global('oldmousex') to camera_angle_x

    -set global oldmousex to MouseX

    Then just plug it in to the rotation formula.

R0J0hound's avatar

R0J0hound

Member since 15 Jun, 2009

Twitter
R0J0hound has 155 followers

Connect with R0J0hound