R0J0hound's Forum Posts

  • You can handle the collisions with the "is overlapping" or "on collision" events. You can alternatively use a behavior such as "Ball" or "RTS" to move the enemies, since they handle objects with the solid attribute as solid. The "custom movement" behavior can also be useful as it has actions to push out of other objects among other things.

  • It's working fine here. Note: It is not triggered if the animation is set to loop.

  • Friction does not prevent rotation, it only keep the object from sliding on the object it's touching.

    You could apply a torque in the opposite direction as the angular velocity.

    +Every Tick

    ---Sprite2 | Apply Physics torque -0.1*Sprite2.Physics.AngularVelocity

  • CA, US

    ping scirra.com = average 186ms

    ping 69.9.34.100 = average 111ms

  • Ashley, just an idea for the way projects are saved in C2:

    When saving the file it overwrites the previous file so if C2 crashes during the save then the whole project could get corrupted. Wouldn't it be a better idea to save to a new temporary file then copy that over the old file. That way if C2 crashes during a save only the most recent changes would be lost instead of the whole project.

    I believe that is how for instance Microsoft Word does it's saving. Just an idea.

  • I had to disable your events as I don't see the issue as it was.

    The yellow ball is rolling down the slope since it has a high friction. If the friction were zero then the ball would slip down the slope. Now if you give the ball a high friction and set "Prevent rotation" to yes then the ball won't go down the slope.

    Does that help or am I missing the issue?

  • Ashley

    I use Avira as well and it detects "TR/Crypt.XPACK.Gen" in the installer and App_p.exe, all the other files are fine. I think it's probably a false positive though.

  • By using a random angle and random distance the point ends up in a circle, the corners are never selected.

    Here is how to have the point random out of the whole area.

    http://dl.dropbox.com/u/5426011/examples%209/randpointonrect.capx

  • Is it the same effect if you use just c2's built in bounded scrolling? The formula just replicates that.

  • vladoss

    Instead of destroying and re-creating the coin you can just use the "move to layer" action.

    Then here is the math you're looking for to move the coin to a location on the parallax 0,0 layer that is visually the same as the scrolling layout.

    coin | set position to (self.X-scrollx+WindowWidth/2, self.Y-scrolly+WindowHeight/2)

  • How about this?

    http://dl.dropbox.com/u/5426011/examples%209/smitchell_train.capx

    Are you planning a platformer?

  • ump. Us there at least a way to know what sprite had been spawned in the family?

    Use a series of sub-events to the spawn action.

    Sprite1 | pick instance with UID Family.UID

    Sprite2 | pick instance with UID Family.UID

    Sprite3 | pick instance with UID Family.UID

    or one sub-event per object type in the family. Only one of them will evaluate true. Another approach would be to use a family variable indicating what the object type is.

  • Post a capx, it should just work when added to a project.

  • 1. When the layout is rotated it behaves that same as normal bounded scrolling.

    2. Change the formulas like so:

    set scroll x: Clamp(Sprite.X, WindowWidth/(2*LayoutScale), LayoutWidth-WindowWidth/(2*LayoutScale))

    set scroll y: Clamp(Sprite.Y, WindowHeight/(2*LayoutScale), LayoutHeight-WindowHeight/(2*LayoutScale))

    If just the layer is scaled replace LayoutScale with LayerScale(layer).

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • When using Fullscreen(scaled) I don't find the WindowWidth and WindowHeight expressions enough to position objects to the edge of a 0,0 parallax layer.

    The solution is to use the Anchor behavior. But since your events indicate you don't want to have to recreate the HUD per layout make the hud objects global and position them on your startup layout. Then they just need to be moved to the HUD layer per layout with events.

    http://dl.dropbox.com/u/5426011/fixed/fix_for_tl22.capx