kriand's Forum Posts

  • Hey acousticputty,

    To create a Sprite, it needs to be placed on a layout at least one time. Where did you place it? I guess it is the one you see when starting your layout. You can either create a separate layout to collect all your objects or you place Sprite 3 outside of your layout. In addition you can give it the 'Destroy outside of Layout' behavior or you can destroy it on start of layout.

  • Hallo Ryan,

    you can not combine two sprites into one sprite without either destroy one sprite and change the animation from the other sprite or destroy both sprites and create an new one with a suitable animation. The other way is to pin two sprites together. Then the two sprites would appear as one. Have both sprites the same texture? If not, depending on the number of possible combinations, the first option would be a lot of work.

    Another option, when i think of a wall or a floor with repeating textures, you can create a tiled background and on collision simply add the width/height to one tiled background and destroy the other.

  • Hey greichelt,

    its because your Android dont know this font. You should choose a Web Font or Sprite Font, So that every device can support your game.

  • Hey mariogamer,

    this should work:

    + Keyboard: D is down
    + PLAYERFIGHTERa: left_right ≥ 0
    -> PLAYERFIGHTERa: Set CustomMovement Horizontal speed to 400
    
    + Keyboard: D is down
    + System: Trigger once
    -> PLAYERFIGHTERa: Set left_right to 1
    
    + Keyboard: A is down
    + PLAYERFIGHTERa: left_right ≤ 0
    -> PLAYERFIGHTERa: Set CustomMovement Horizontal speed to -400
    
    + Keyboard: A is down
    + System: Trigger once
    -> PLAYERFIGHTERa: Set left_right to -1
    
    + Keyboard: W is down
    + PLAYERFIGHTERa: up_down ≤ 0
    -> PLAYERFIGHTERa: Set CustomMovement Vertical speed to -400
    
    + Keyboard: W is down
    + System: Trigger once
    -> PLAYERFIGHTERa: Set up_down to -1
    
    + Keyboard: S is down
    + PLAYERFIGHTERa: up_down ≥ 0
    -> PLAYERFIGHTERa: Set CustomMovement Vertical speed to 400
    
    + Keyboard: S is down
    + System: Trigger once
    -> PLAYERFIGHTERa: Set up_down to 1
    
    + Keyboard: On D released
    -> PLAYERFIGHTERa: Set CustomMovement Horizontal speed to 0
    -> PLAYERFIGHTERa: Set left_right to 0
    
    + Keyboard: On A released
    -> PLAYERFIGHTERa: Set CustomMovement Horizontal speed to 0
    -> PLAYERFIGHTERa: Set left_right to 0
    
    + Keyboard: On W released
    -> PLAYERFIGHTERa: Set CustomMovement Vertical speed to 0
    -> PLAYERFIGHTERa: Set up_down to 0
    
    + Keyboard: On S released
    -> PLAYERFIGHTERa: Set CustomMovement Vertical speed to 0
    -> PLAYERFIGHTERa: Set up_down to 0
    [/code:2a0h1fhg]
    
    .c3p-file: https://1drv.ms/u/s!Ap_-qxoGKbDcblqe_8E7oYDLpLI
  • Hey yolkgames,

    if I understand you correctly, you can put all objects you want to reset in a family and add two variables 'Start_X' and 'Start_Y'.

    On start of layout you set those variables to the startposition. When you trigger your position reset, you can set the family objects to this coordinates.

    + System: On start of layout
    -> Family: Set Start_X to Family.X
    -> Family: Set Start_Y to Family.Y
    
    + Keyboard: On Space pressed
    -> Family: Set position to (Family.Start_X, Family.Start_Y)
    [/code:2509cgir]
  • Hey netserwer,

    I noticed that my first method works unreliable. Maybe you should try this one with collision boxes. I also added a second platform that moves in the other direction:

    + System: On start of layout
    -> Platform: Set Bullet angle of motion to Platform.Start_Angle degrees
    
    + Platform: On collision with CollisionBox
    
    ----+ Platform: Type = "right"
    -----> Platform: Set Bullet angle of motion to Platform.Bullet.AngleOfMotion +90 degrees
    
    ----+ Platform: Type = "left"
    -----> Platform: Set Bullet angle of motion to Platform.Bullet.AngleOfMotion -90 degrees
    [/code:1uv3rtac]
    
    File: https://1drv.ms/u/s!Ap_-qxoGKbDcbZXD7ePpaAzAtKc
  • Hallo Wai,

    i dont know what your are working at, but I would suggest tiled backgrounds for the lines. If you use sprites and change their size, they will be stretched. Also they need more resources.

    Here is one way it can be done (.c3p): 1drv.ms/u/s!Ap_-qxoGKbDcaqooBUbXPbsF4dk

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • Hallo NeronSparda,

    you can use the 'Repeat' Condition to create more bullets with one click. But when all bullets have the exact same direction, they overlap each other and it looks like one bullet. If you want to shoot multiple bullets one after another with a short delay, you can make it like this:

    + Mouse: On Left button Clicked
    ----+ System: Repeat 5 times
    -----> System: Wait LoopIndex ÷ 10 seconds
    -----> player: Spawn bullet on layer 0 (image point 1)
    [/code:1fc37b1e]
  • Hi HumboldtSPPS,

    If you use multiple sprites you need to put them into a family and use it in an collision event: on collision with family_finger -> destroy family_finger. Costruct destroys only the family member that was on collision. Another way without using families is to use only one sprite with different animations for each finger.

  • Hi plinkie,

    that would work too, but he asked for an 8 direction movement. To restrict the obejets movement to 0°, 45°, 90° etc. using 8Direction is an easy solution without too much coding. If you use Pathfinding only, the object can always move in every angle. I do not know that you can limit this without spending too much effort.

  • Hey WeariedCoffee2,

    for this you have to combine Pathfinding with another Movement Behavior. The Object calculates the path with Pathfinding and moves along the path with 8 Direction, for example. Here is one way it can be done:

    .c3p-Example: 1drv.ms/u/s!Asn1IURKZWj8gTZuGl1-6u1xApJU

    Code: 1drv.ms/i/s!Asn1IURKZWj8gTemrlI0q43OBXQF

  • Hey Everyone!

    This looks really good, dop2000!

    I tried it myself and after some bugfixing and fine tuning it works!

    Here is my code for C3:

    1drv.ms/u/s!Asn1IURKZWj8gTWyUBXqilplh8jG

    Have fun