dop2000's Forum Posts

  • Pipes in this game only exist for about a second, then get destroyed. So we are talking about creating new pipes, no need to change movement for existing pipes.

    Code example that I gave changes Sine movement to vertical for all newly created pipes after 5 seconds of playing.

    You can modify it like this:

    variable MovementType=0
    
    Every 15 seconds
        Add 1 to MovementType
        MovementType=4 -> Set MovementType=0   //  this will reset back to 0 after 60 seconds
    
    Every 1 second ->    Create object bottomPipe
       // no need to add "MovementType=0 -> set movement to horizontal", because that's the default movement
        MovementType=1 -> bottomPipe Set Sine movement to Vertical
        MovementType=2 -> bottomPipe Set Sine movement to Angle
        MovementType=3 -> bottomPipe Set Sine movement to Size
    [/code:d6jam51w]
     
    This will do what you want - first 15 seconds pipes will have horizontal movement, next 15 seconds vertical, next 15 seconds angle, then size, then back to horizontal.
    
    Another way to do this is to add 4 Sine behaviors to the sprite, one for each movement type (rename them to SineHoriz, SineVert, SineAngle, SineSize). Then by enable/disabling them with events you can create combinations of movements, say horizontal+angle, vertical+size etc.
    
    One more thing - it's better to use Timer behavior instead of "Every X second".  With Timer you have better control, you can stop it, restart, check remaining time etc.
  • Does your spritefont (image) actually contain capital letters?

    It works for me:

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

  • I don't really understand what you mean. If you share your project or a screenshot of your events, I may be able to explain what's going on.

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • The pipes are moving too fast and disappear from the screen before they change Sine movement.

    But now I understand that you wanted to change movement at the moment the sprite is created, not 5 seconds after it was created.

    I'm guessing you want to create pipes with Horizontal movement for 5 seconds, then with Vertical movement for 5 seconds and so on?

    You can do this with a single variable, say verticalMovement=0

    Every 5 seconds
        verticalMovement=0  -> set verticalMovement=1
        Else -> set verticalMovement=0
    
    Every 1 second ->    Create object bottomPipe
        verticalMovement=1 -> bottomPipe Set Sine movement to Vertical
    [/code:2h6s54w7]
  • So "On key pressed" is the only condition and it's not inside some other event like "Every X seconds"?

    Then it should work.

    Do you use TextBox? When cursor is in the TextBox, some keyboard events may not work.

    If nothing helps, please share your capx.

  • It's hard to tell without seeing your code.

  • I still don't see any errors.

    Could you save your project as a single file (capx) and share it?

  • No, it's all correct. I did the same and it works for me.

    Maybe there is something else in your code that breaks it.

    Did you set "active on start=yes" for Sine?

  • When you spawn a family instance, family member will always be picked at random, you can't predict it.

    Why did you make them as separate objects anyway? If the only difference between bullets is their color, you can put them all in one sprite (as 3 frames or 3 animations). Then simply spawn this sprite and change its frame/animation.

  • You can do this with "overlapping at offset", but this will require some math.

    There is an easier way:

    Define an imagepoint on the platformer sprite, which is a few pixels below its bottom edge. (outside the image)

    Then you can use this event to check if platformer is on the tilting Floor or within several pixels from it:

    System-> Floor is overlapping a point (platfromer.ImagePointX(1), platfromer.ImagePointY(1))

  • Add Timer behavior to your object.

    On object created -> Object start timer "ChangeMovement" for 15 seconds (Regular)

    Object on Timer "ChangeMovement"

    ...Object: Sine compare movement is Horizontal -> Object: Sine set movement to Vertical

    ...Else -> Object: Sine set movement to Horizontal

  • Have you tried uppercase() expression?

    SpriteFont set Text to uppercase("abcd")

  • brandonP

    The shadow itself is invisible. ShadowLight object has "Destination out" blend mode and the shadow works as a mask for FOV sprite. They both need to be on the same layer.

  • You can replace your text objects with SpriteFont.