sled's Forum Posts

  • I understand that I ask too much. It's too difficult for users on this forum to do it ?

  • or if it so problematic, maybe someone could explain me step by step how to display score from constuct on facebook after game is finished

  • Hi

    I have read the now outdated "How to publish your game to facebook" tutorial and searched forum but there was very poor instruction about how to publish your score to facebook. I'm not a programer and I haven't found any step by step tutorial about this. So if there is no tutorial about it could someone provide a capx file with this? Thanks in advance.

    I want to be able when the game ends(time of level ends or something) to:

    1.login in - this I was able to do

    2.take facebook user score from game to facebook score

    3.display hi-score board with user score and their facebook profile photo and his other friends.

  • Hi!

    My game has two layouts. First is a "Title" layout where player hits enter and then game goes to the "game" layout. In my game the blocks are falling from top to bottom one at a a time.

    My problem is that when player is waiting for too long in "title" layout and then hits enter, the "game" layout is starting but it looks like this "game" level was started simultaneously with title layout, because the blocks are not falling one by one but five or four at once first and then normal.

    My condition are:

    "Title" layout:

    keyboard -> when player hits "enter" ->go to layout "game"

    "Game" layout:

    at start of level ->reset global variables

  • Every ticks -> set speed to startSpeed + floor(points/100) * 10

    the speed with increase by 10 every 100 points

    Yann this event is not increasing by every 100 points but with every 1 point :( Maybe if You explain to me what is your "startSpeed" variable because i have written exacly what you said and this doesn't work :(

  • Yann I checked Your condition and there is something i don't understand beacuse it speeds up my blocks every time player catches ONE block!

    speed is a global variable

    startspeed is global variable with value of 50.

    Every Tick -> System -> set speed to startspeed+floor(points/5)*100

    And this condition doesn't work for every 5 points but for every 1 point only, so would You be so kind to describe it more clearly.

  • Thanks. Ok what Am I doing wrong, beacuse it almost works, but speed increases with every point not with every 100 points :/ Here is my condition:

    Every ticks ->System -> Set speed to 100+floor(points/5)*100

    I wrote "(points/5)*100" to check faster if this works.

    Is this startSpeed holds somehow first value of speed?

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • In my game when my character catches one type of falling block it adds 10 points to score, and when it catches another it adds 20 points, 15 points whatever.

    But my problem is that i' ve got condition :

    "points % 100=0" so when I let's just say have 90 points and then catch 20 points block the score will be 110 so this condition is not working anymore to speed up falling because it's not 100. I want to speed up those falling blocks regardles if it's 100,110, 220, 350. I just want them to fall faster when score passes another 100 points.

    I hope i described it clear enough.

  • Thank You very much ramones. It was very helpful, but let just say I want to add another block which adds 20 to points. Do i have to write something like:

    System -> Points %100=0

              Points %110=0

              Points %120=0...

    to cover all posible scores for blocks to speed up?

  • UPDATE:

    Maybe i didn't explain clear enough. I'm making a game where blocks are falling from top to bottom and players catches them, but that is not important. I want those block to accelerate to fall faster with every 100 points but i don't know how to do this. I've got my own movement system if someone wants to know.

    First I made my variable like this:

    • "Falling Block" with variable "speed" that is a number and have value of 0.

    I'm setting my variable in "on start of layout" to

    Sprite11 -> Set speed to Sprite11.Y+1

    and then

    System -> Points %5=0    -> Sprite11 ->Set speed to Sprite11.speed+5

              Trigger Once

    but when Points passes 5,10...and so one blocks are not accelerating.

  • I want to thank everyone for Your quick answers and good explantations of modulus. Now i'm begining to understand how modulus works, but can I use it to accelerate falling elements in my game. I want my elements for every 100 points to accelerate so that with every 100 points they would fall down faster and faster.

  • Thanks :) I did what You wrote and now it works. Is this like 10% of current value of points equals 0 and why it equals 0. Could You explain to me this more clearly. I'm just starting with Construct 2. Thanks in advance:)

  • Hi

    I haven't found this anywhere so:

    How to do condition that repeats itself for every let's just say 10 points. I know there are many examples with time, but none with something other then time.

  • Yes I know that inline and block was in css, and i thought that it describes the situation quite well:D

    I must doing something wrong. When i put your code in event sheet everything is good, but no results in game, hiscores still displays in one line and not in a block. This spritefont is a plugin i have found in this forum. It's a sprite, so i think i can't append text to it :(

    Anyway here are my screenshots, I hope they are allowed here.

    First is this Spritefont object events(they are not mine, they were in example of usage)

    second are the request to php

    and the third is your Ajax condition, on my events:

    I checked the post.php file, and it has this "\n" at the end

  • Thanks Yann, with your fantastic help I was able to get it right, but now I have another question.

    I want to do this hiscore thing with spritefont plugin, but scores are displayed inline(player1,30,player2,50...and so on) with that plugin and i don't have to say that it looks bad.

    How to make them display in block like in normal font.