DiegoM's Forum Posts

  • You can just open the .zip file as if it was a .c3p file in C3, infact .c3p files are just .zip files with a different extension :P.

    Some websites complain when you try to upload files with strange file formats, so changing to .zip works. I do it without even thinking now, so I forget a lot of our users don't even know you can do that.

  • If you enable the Default controls in the platform behaviour and disable the Solid behaviour of GameBackground, then the player instance can move.

    I don't know the details of how the solid behaviour is implemented, but I guess if something is inside a solid, it won't be able to move :P

  • The System expression angle is what you are looking for. You pass it two sets of coordinates, a starting position and an ending position, and it will calculate the angle between the two points.

    In the following example project I use it to set the angle of instances using the Bullet behaviour. The bullets are created at the position of the player instance and then an angle is calculated between that position and the mouse pointer position.

    You should be able to accommodate this idea to what you are working on.

    https://www.dropbox.com/s/b6yvnqojlufxfwk/New%20project%20%285%29.c3p?dl=0

  • You can do this using the System expression unixtime to get the current time in milliseconds. Then you need to use a little JS script to get the time in milliseconds of the target date.

    With those two numbers you can calculate the difference between them, and from the result extract all the different parts of the countdown timer.

    This is a little bit more complex than it seems, so I made a little project. Hopefully this will be useful to others aswell.

    https://www.dropbox.com/s/ro5sukq3sytb42x/New%20project%20%284%29.c3p?dl=0

    The project calculates the time remaining until the 1st of January of 2021, but can be adjusted to count down to other dates as well.

  • You saved the project as a folder, so you need to go to Menu -> Project -> Open -> Open local project folder and then select the whole folder than contains your project.

    When you save this way, a .c3p file is not created.

  • For this kind of logic you need to be very specific for it to work as expected. That means checking for the state of ALL the options.

    So if the set of answers is [A, B, C, D and E] and the correct set is [A, B], what you need to check for is A = true and B = true and C = false and D = false and E = false.

    In that case, your answer is correct, in any other case it is wrong.

    If you don't do it that way, you will get unexpected results, as you have experienced already. This is because if you only check for A = true and B = true, the code is not taking into account any of the other options, as long as those two conditions are met, the answer is correct.

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • Don't worry about a test project, sorted out the issue. The fix will be available in the next beta release.

  • Try saving the position of the axe when the tree's life reaches 0. Save it in an instance variable in the tree object. Then use that position to check to which side the tree should fall. It won't change again, so the tree will continue to fall to the same side.

  • I am seeing a similar issue, but not quite as you are describing. The Sprite Font doesn't preview opacity properly in the editor, but at runtime it works fine.

    Can you share a project reproducing the issue?

  • I was going to suggest using keyframe tags, but after trying this out for myself, I think you might have uncovered a bug.

    It seems like if you are able to pause a timeline right at the moment it begins (time = 0) or ends (time = max), something which is doable using keyframe tags, Construct assumes the timeline should be destroyed.

    I'll have this fixed for the next beta release. Thanks for bringing it up!

  • There seems to be a difference in how events are handled when you preview them directly and when you transition between them, need to investigate that further.

    That difference is causing your first attempt with a not playing condition to fail, because while it works when you preview the layout directly, as you would expect, because the Play action comes before the check... when you enter from another layout the condition is hit once, before the timeline starts playing, starting the whole process to exit the layout before the timeline is finished.

    Your second attempt, avoids that problem by using the On Finished condition, but the fade to black transition does not work, because the trigger is only hit once, so updating the opacity based on a delta, doesn't work.

    In order for that to work, you would need to set a flag on the On Finished trigger, and then based on that flag decide when to start playing your fade to black animation, elsewhere in the event sheet.

    You could also add the instance that is the black background to Layout 2, set it to opacity 0% in the editor, and animate it in the same timeline you are using to move the cat. Below an example file showing that method. The good thing is you can get rid of some of the events, as the timeline takes care of everything regarding the animation.

    https://www.dropbox.com/s/g714jdw9z3iwzg2/FrankieGame2.zip?dl=0

    Your game reminds me of an old DOS game, Alley Cat https://www.youtube.com/watch?v=uZDG4dlU5uY

  • I'll take a look on this to see what is going on.

  • Looking at this now, sorry about the delay, I was hanged up with a few other things!

  • Can you share your project? That is the best for us to be able to figure out what is going on.

  • Sprite, Tiled Background, Tilemaps and even Drawing Canvas, can be thought as only graphical representations for the objects in a game. So it really doesn't matter how you are using them as long as they draw what you want where you need it.

    The names might imply they are meant for certain tasks only, but if they work for a particular need, it should be just fine to use what ever you feel like. Of course if you need frame by frame animations, I highly recommended you use the Sprite plugin over some other dubious method.