LittleStain's Recent Forum Activity

  • I usually add a browser object, put these actions in a function and call the function both on start of layout and on browser resized.

  • It's as easy as:

    object on collision with ground - object destroy

    You can find the on collision event under "Collisions" when the add events dialog opens.

    The collision-check itself has nothing to do with the physics-behaviour.

  • I don't think it's humanly possible to press the button at exactly the same milli-second off the "on timer".

    It might be better to check the time passed since the last timer to see how close to the beat the player has pushed.

  • The behaviour you'd like from the rocket would (almost certainly) be different from the behaviour somebody else would like for a rocket.

    Creating all these different possibilities would be near impossible.

    It would also feel like a waste of time, considering the effects can be achieved by adding events.

    The fuel could run out based on time - adding the timer behaviour would work for this

    The fuel could run out based on distance traveled - subtracting the distance traveled from the amount of fuel would work for this

    Initial acceleration could be achieved by increasing the speed from 0 to the max speed after the rocket is spawned.

  • When recreating it in my own project it does work, so could you explain what it is that isn't working and what effect you do get?

    capx download

  • To check if the x position of the anchor is still 236 pixels, you could set an object to that position every tick.

    It is possible that although it stays in the same position on it's own layer the x-position within the project changes, due to the paralax.

  • I usually work with ViewportLeft, ViewportRight, ViewportTop, ViewportBottom for these kind of things.

    Easiest if the sprite has it's origin in the topleft-corner.

    on start of layout

    sprite set width = viewportright(q) - viewportleft(q)

    sprite set height = viewportbottom(q) - viewporttop(q)

    sprite set position = x= ViewportLeft(q), y= Viewporttop(q)

    if the sprite has it's origin in the center : x= Viewportleft(q)+0.5*(viewportright(q)-viewportleft(q)) , y= Viewporttop(q)+0.5*(viewportbottom(q)-viewporttop(q))

    where q is the name or the number of the layer on which the sprite is

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • From the manual:

    https://www.scirra.com/manual/88/anchor

    Objects using the Anchor behavior should also be placed on a layer with its parallax set to 0, 0. Otherwise as the game scrolls the objects may "lag" behind the screen.

  • How about something like...

    https://dl.dropboxusercontent.com/u/143636437/examples%20for%20web/fishy%20drag%20and%20drop%20offset%20example.capx

    I find this reaction very offsetting...

  • I was thinking along the lines of making all guns different animations of the same gun-sprite.

    That way an instance variable would be used to determine which gun to display and how the gun works.

    gun if instance variable = bazooka

    fire Very big bullet

    You could also use a boolean variable InUse set to true when the player is holding it and to false when it's on the floor.

  • This tutorial should explain a lot :

    https://www.scirra.com/tutorials/73/sup ... reen-sizes

  • You can always set the angle of the sprite in events, so you could also choose to set the angle of the sprite to be the same as the angle of the bullet motion through events.

LittleStain's avatar

LittleStain

Member since 26 Apr, 2011

Twitter
LittleStain has 4 followers

Trophy Case

  • 13-Year Club
  • Email Verified

Progress

14/44
How to earn trophies