InDWrekt's Forum Posts

  • 1 - Just set the preview panel objects from the instance variables on the Highlight objects.

    2 - The wrong answer is exactly the same as the right answer just with a not equals. You will also want to only allow it to trigger once while true.

    3 - DON'T DELETE, just move them off the screen. If you take a look at my example, the highlights start off the screen and there is an on screen check.

    4 - The animal text event is exactly the same as the animal event. I am not sure what your question is. If you can do the one, you can do the other.

    5 - In the on-click event, just add a condition comparing the opacity = 100.

    6 - Just increment the values in the events where you play the sounds. Also, if these variables are specific to the level, (meaning the count of tries is reset on each level) I would suggest not using global variables. Instead, add an instance variable to one of the objects on the layout. I would put it on the text object that displays the value. I make this suggestion because global variables are remembered between layouts so you will have to clear them on start of each layout.

    I hope this gets you what you need and good luck with your project.

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • I think this example should give you all you need. Take a look.

    drive.google.com/file/d/1INg7SXrc4XT3ew7nmUkOuTFpHGy0xdIU/view

  • When you export to android, there is an option to hide the status bar. Make sure you have that checked.

  • I took a look at your project and yes, there is a much more simple way to do what you are trying. Take a look at this sample project. I added 3 layouts all using the same event sheet with 4 events. It should be relatively self-explanatory. I used a text object for the color name. The only thing you have to do different is, get the animation name instead of the text value of the selected object.

    drive.google.com/file/d/1Nt95lJl46rAwFQkRk0aFc8MyhJZHy9dV/view

  • A level select menu only needs 1 event. Name the level the same as a variable on the item you are clicking to select the level (if it is a dropdown, the dropdown selected text should be the same as the level name). Then use the Go To Layout by Name action passing in the variable from the item.

  • The issue is caused by the size change. A mirror sprite has a negative width. That is how the system handles mirroring. Since you are setting the width to a positive value, you are losing the mirrored appearance. Instead of setting the size, could you set the scale? That might be the easiest fix for you. If not, you will have to check mirrored state and reset it right after changing the size.

  • The idea by AllanR would work just fine but requires conversion back and forth between the object you click and the animation you show. Conversely, creating an object that follows the cursor from the clicked object uses very few events and doesn't require the addition of a cursor sprite object. Take a look at the example project.

    drive.google.com/file/d/1M6zdd0rbgjiJcGq0AkrEiarz6bJGw4-p/view

  • Set the mouse style to None and every tick, set the position of the sprite object to the mouse position.

  • Take a look at the Simple Light example in the beginner examples shipped with Construct.

  • I modified the example project with the changes we discussed on Discord. Hopefully seeing them in action will help you finish your project. Good luck.

  • This looks like it works better:

    Date.ToDateString(Date.parse("11/22/2021"))

    I am available on Discord to chat for a while. discord.gg/48PjzKZW.

    The more I play with it, the more I see things going wrong with the get. Not sure if they are bugs but I can help you work through it if you would like.

  • Except, I was just playing with your code and realized 11 doesn't mean November. It means December. Months are 0 based meaning January is 0 and it goes up 1 from there. That may be the one thing causing you the most grief. In programming, it is most common to start counting with 0, not 1. In cases like month in the date object, it can get confusing if you aren't used to this.

  • My answer is very wordy. I think all you need to do is move the last parens before the /24.

  • int(Date.ToTotalHours(abs(Date.Difference(Date.Parse(Date.ToDateString(Date.Now)), Date.Parse(right(BDay.Text, 11))))) / 24)

    Try this again, when I copied over the code and removed my project specific stuff, I must have messed up the parens. Here is the code the way I have it in my project. As you can see, there are more parens before the /24. In yours, you put it after. That means you are dividing my 24 too early and it throws off the result.

    In my example project I am using Date.Parse(right(BDay.Text, 11)) to get the birthday info from a text object. This is no different than using the Date.Get(2021,11,22, 0, 0, 0, 0)) method.

    Here is a link to the example I built to figure out how to solve your problem:

    drive.google.com/file/d/1njkOW5E93Z6dAKfrj2u2FB2pDBqoCkmo/view

  • I think the second example you are looking at is doing WAY more then is necessary. I would suggest you ignore that one. All you need to get the date difference is this:

    int(Date.ToTotalHours(abs(Date.Difference(Date.Parse(Date.ToDateString(Date.Now)), Date.Get(year, month, day, hr, min, sec, mil))) ÷ 24)

    The first date, "Date.Parse(Date.ToDateString(Date.Now))" gets the current date without time. That way the time of day won't mess up the difference function.

    The second date is where you pass in the birthdate. For the year, use the year of their next upcoming birthday. If their birthday this year has passed, use next year. If not, use this year. For everything after day, you can just pass in 0.

    To break it down, the date difference function returns the difference between the 2 dates in milliseconds. Abs so we don't get a negative value. the TotalHours function then gives us the millis in hours so we divide by 24. Finally, we pass it into the int function to just get the integer value representing days.