R0J0hound's Forum Posts

  • C2's expressions only support numbers and strings so that's all you can return from a expression function. The variadic presumably mean either a number or a string.

    Any JavaScript object can be converted to a json string. I don't recall offhand but It's done with a function built in to js. A Google search for converting an object to json in JavaScript should give you that solution.

  • I haven't had a chance to run the capx but just to hazard a guess you're probably running into a percision limit for floating point numbers. Aka after a point tiny changes to giant numbers are rounded off. A Google search for the details of floating point numbers will give lots of interesting stuff on the subject. Typically space games or game with huge worlds like minecraft work around this keeping numbers closer to zero and shifting the position of stuff around. In the case of your super high speed I'd just scale all the numbers down. I mean speed is relative and you don't need to use actual units.

  • irina

    yeah, I just updated the link.

  • damjancd

    Try the link again. I think I haven't been considering object recycling when the instances were destroyed. now it discards the references to the textures/canvas' when an instance gets destroyed. If that doesn't work then I'm at a loss.

  • The two ways I've used to do that are either:

    * move the player if he exits either end of layout. Scrolling is unbounded and the seam is hidden by either carefully placing objects in the same places on either end or using the paster object to copy the other side. It just to make the transition appear seamless.

    * move everything under the player instead of the player. And just wrap the pieces as the leave the layout.

    Both those take care of the visual portion. The seam will be a problem with ai and such so you'll have to take that into consideration with your events.

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • The reason something like a beach ball is floaty is because of air resistance. With the physics behavior or even with most simulators in general it's like objects are moving through a vacuum, in which case nothing would be floaty.

    Now the solution is to apply a force proportionate to the object's speed in the opposite direction of the object's motion. Basically we're adding a drag force.

    The following would do it, just tweak 0.1 till the object has the desired floatiness.

    every tick

    --- apply force -0.1*distance(0,0,Self.Physics.VelocityX,Self.Physics.VelocityY) at angle angle(0,0,Self.Physics.VelocityX,Self.Physics.VelocityY)

    EDIT:

    or alternatively you can look at the linear damping property.

  • kmsravindra

    I guess it is possible but I'm unfamiliar with a method. Probably some kind of linear regression or something. Also it's something you'd do outside of the plugin.

  • ryrydawg

    This would give the current time in milliseconds:

    Browser.ExecJS("Date.now()")

    source:

    https://developer.mozilla.org/en-US/doc ... jects/Date

    You could also look here for a plugin that also does this:

    viewtopic.php?f=153&t=63492

    If nothing else you'll probably find an example that is helpful.

  • Sounds like it may be an issue with the gamepad plugin perhaps. The issue of the "for each" effecting the other events possibly could be related to an "or" bug reported about a week ago.

  • Maybe Spriter, Spine or creature2d? They are all programs to define motions with bones or something to that effect, and they all have plugins on the forum.

  • Juicy

    This plugin isn't really useful for doing destructible terrain. I mean it works visually but you can't do collisions with it. The canvas plugin can since you can read the pixels with it. However better than canvas is using the tilemap plugin with 1x1 tiles. With it collisions need no extra work, but it does take some more work to setup the canvas and make it erase a circle.

    Probably this:

    or this one may give some ideas:

    For best performance use only one tile on the tilemap and instead color it with another object and a blendmode.

  • If 180 degrees is 30 minutes, then 360 degrees would be one hour. How would you like times greater than 1 hour to be represented with the timer?

  • Juicy

    What would you like to do? The most basic thing you can do is draw other objects to it. To do that position the other object so it overlaps the paster object and use the "paste object" action.

  • I don't have a joystick, but I can't get the same result if I use keyboard instead. What are the values returned for the joystick axis when not pressing anything?