R0J0hound's Recent Forum Activity

  • 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.

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • 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).

  • 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

  • I can't open your capx because I don't have all those plugins installed, but try to use 320 and 240 instead of WindowWidth and WindowHeight.

  • I'd like to make a correction, it's not a bug at all. Instead of using the WindowWidth and WindowHeight expressions when in Fullscreen(scaled) mode, use the Edit time window size.

  • Eureka,

    I realized it was a different issue. In your capx use the edittime windowwidth and windowheight values for positioning.

    For ex. it would be

    Sprite set x: scrollX - 640/2

    Sprite set y: scrollY - 480/2

    So you would do the math as if the window were not scaled at all.

    Edit:

    Actually it looks like no issue at all. I thought it was because with unbounded scrolling off scrollx and scrolly were returning 479.25 and 240, but it seems to be correct.

R0J0hound's avatar

R0J0hound

Member since 15 Jun, 2009

Twitter
R0J0hound has 155 followers

Connect with R0J0hound