fm4fanAT's Recent Forum Activity

  • Hi,

    If you look at this tutorial for a jumping ball http://www.mediafire.com/download/olczm ... +Ball.capx

    (Tutorial on Youtube

    Subscribe to Construct videos now

    )

    and then combine that with a flappy bird tutorial (there are plenty of them out there) you basically have your game you asked

  • There are many ways

    make a sprite on the top left corner

    Events

    system > every tick | objSprite > set position to > X= lerp (Self.X, 500, dt) Y= lerp (Self.Y, 500, dt)

    this makes a transition from the current X and Y position to XY500 and the speed it uses is delta time

    I used delta time, because it is framerate independent.

    Here is the explanation from the manual

    lerp(a, b, x) Linear interpolation of a to b by x. Calculates a + x * (b - a).

    for dt (delta time) http://www.scirra.com/tutorials/67/delt ... dependence

  • Here is one solutions (didn't test it)

    Let's say your tiles are 50x50px

    You click on a spot somewhere - let's take 205, 140

    You could store this values in a variable and now do a little bit of math (here I call the variable vX and vY)

    floor (vX / 50) * 50 and the same but with vY

    floor just round the number down, so the result would tell you wich tile it is and so if multiplied by the tile size you get the position of the tile. If the origin point is not on the top left but in the center you would need to add 25 to your calculation.

  • in this case yes

    to change that you could make a more precise random number

    random (30,(WindowWidth-30))

    Now the number starts at 30 and ends 30 pixels left of your layout.

  • create a Sprite and add a bullet behaviour

    Event

    system > on start of layout | objSprite > destroy

    system > every 2 seconds | system > create objSprite on layer=0; x=random (WindowWidth); Y=-30

    add action > objSprite > set Bullet angel of motion=90

  • try a new project

    create one sprite with fade behaviour > name it objSprite

    set the fade properties to active on start < no

    fade out time > 8

    now in the event sheet

    system > on start of layout | objSprite > destroy

    system > every 2 seconds | system > create obj sprite [layer = 0, x= random (WindowWidth), Y= random (WindowHeight)] //the order of the actions is important

    add action > objSprite > set fade in time = random (0,5)

    add action > objSprite > Fade: start fade

  • If I am not mistaken you need to to this for every object

    system > for each objCircle and then whatever fade time you want random e.g. (0,5)

    or if the circles are not already on the screen, but individually created in an event

    just put another action underneath the create object - like set fade in time to random (0,5) and another action to Fade start fade (here the Fade active on start has to be disabled)

  • You could add a sine behaviour to your object and set the start of the vertical sine and the duration in the event sheet (with your variable).

    Or half the duration wait a little bit and start the sine with a period offset to bring it up again.

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • A link to the game https://www.scirra.com/arcade/shooting- ... rates-5956

    I didn't like the game when I started it, but a split second before closed it I accidentally touched my scroll wheel and TATAAA a much better game.

    I liked it zoomed out way more and I didn't had to guess stuff like - where to go, where are the enemies, ...

    ps. a nicer thumbnail would help you attract more players

  • Oh, was too late - same idea, but I also have a second solutions so I post it anyway

    I'm not sure if I understand you correctly

    Do you mean you don't want player1 to cross to the other side?

    If yes, I have two solutions

    You can make an invisible border with a sprite block that can't be crossed. Or make a custom key movement for your player and give him a second condition (the following example subtracts half of the player x size - in this case 16 if the origin point is centered)

    If pressed right

    and

    Player position.x <= windowwidth/2 - 16

  • Here you find a capx with different AI types (including on sight)

    https://www.scirra.com/tutorials/1270/b ... latformers

    the code is a little bit messy, but you can figure out the basic AI stuff.

  • I found the best practice to give objPlayer an instance variable (isMirrored > boolean > false).

    Because here you can set events and check if he is looking right or left - like

    if objPlayer isMirrored then ...

fm4fanAT's avatar

fm4fanAT

Member since 19 Jan, 2016

Twitter
fm4fanAT has 1 followers

Trophy Case

  • 8-Year Club
  • Popular Game One of your games has over 1,000 players
  • Email Verified

Progress

10/44
How to earn trophies