lionz's Forum Posts

  • You can use floor(random(52)) which generates a number from 0 to 51, where each number corresponds to a card. You could do this with events or store in an array. On the first drawn card you can set a variable to that number then on second drawn card you compare with that variable and if it matches, run the random command again.

  • > I was thinking of something :

    > - Put on your scene a few invisible obstacles that you can activate/desactivate.

    > - Every time an object has to find its path, chose randomly a random number of obstacles to activate. This will create for every object a different path to choose from. One path is calculated, disable active obstacle and apply the same process to the next object

    > - Of course, you'll have to place your invisible obstacles on stage so that they won't create dead end where an object can be stuck.

    >

    > I didn't give it a try but this may be worth trying

    >

    Having trouble doing this... After assigning a round(random) number to the pathfinding object on creation, I add obstacles to it depending on what number it was assigned and then find a path. After finding the path it just goes straight through everything toward the destination :/ Any ideas?

    Whenever the obstacles change you need to regenerate obstacle map.

  • Drag the ipa into the apps tab in iTunes and sync with the device.

  • I think that name might already be taken by another game series...

    You should call it Cute Knight though.

  • I was thinking of something :

    - Put on your scene a few invisible obstacles that you can activate/desactivate.

    - Every time an object has to find its path, chose randomly a random number of obstacles to activate. This will create for every object a different path to choose from. One path is calculated, disable active obstacle and apply the same process to the next object

    - Of course, you'll have to place your invisible obstacles on stage so that they won't create dead end where an object can be stuck.

    I didn't give it a try but this may be worth trying

    Yes that's what I was saying above. I've put it into practice and it works.

  • The pathfinding calculates the shortest route each time. If I was to do this I would create obstacles before calculating the path to alter which way they go. You could create a number of set routes by blocking certain directions.

  • You've posted this in the wrong place.

  • Yep, on initial hit , you do X damage and set a variable to true and start a 10 second timer. Then you have a separate event where if this variable is true, do Y damage every 2. Then when the timer has finished, set the variable back to false.

  • Your link is broken because you don't have enough rep yet, you'll have to 'edit' it a little. : DD

  • You add the compare as a condition, press C, you can add the compare vars after the initial on button clicked, so it becomes on button clicked, if var=var, do this. In C2, the ifs are just conditions. It will only execute actions on the right if the conditions on the left are true. So if you click the button and those vars do not meet the condition you want, then clicking the button will not execute the action on the right and do nothing at all.

  • Ya it's all here https://www.scirra.com/manual/112/facebook

    You need to create an app on facebook developers. You then add the features in C2/C3 with the facebook object, i.e. publish to leaderboard.

    This Clay.io feature also looks like it handles leaderboards well https://www.scirra.com/tutorials/348/in ... tures#h2a2

  • The easiest way is to integrate the Facebook SDK.

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • I thought dt would be the most accurate and it seems to be so far, when I tried simply adding to a variable or using a timer it was quite a bit out. I was looking for an answer where someone might've used some calculations with framerate to ensure it is always exact, it's not something I've looked into until trying out this game idea. I guess there is also the issue that platform stats can be slightly off when trying to recreate the exact movement.

  • I am doing the following : a player runs across the screen and does something, the time is recorded, the layout is restarted and at that recorded time the player repeats that action. When I do this, there is discrepancy where the player X recorded is out by several pixels.

    Does anyone have any tips on how to get an exact time for something to happen, I assume based on dt? I'm using dt but there is still some discrepancy by a number of pixels, I'd like to get it rounded up to the same whole int if possible. Note, the time IS the same, but the player X is out i.e. the action is starting earlier or later than expected by a number of pixels.

  • If you don't want them as separate objects then you can define the 'type' with an instance variable ID. If type = 1, then other variables are x, y and z, if type = 2, then other variables are x, y and z etc. You can also define the animation in the same way, if type = 1, animation = "type1" etc.