InDWrekt's Forum Posts

  • Using this method for the score/new life will be much more difficult than the every Nth click event you mentioned in your first post. Scores rarely hit exactly on the value you earn a bonus for. You usually get it when your score is greater or equal to the necessary score. For this situation, I would suggest you set a LastBonus variable and check where Score >= LastBonus + 100.

    I was suggesting the method again for the click iteration situation. In that case, the user will always click a 5th, 10th or 15th time. You can't skip from clicking 4 times to 8 times. The (VarScore % 100 = 0) means the score has to be an exact multiple of 100.

    For the last question, yes. If the variable you are testing starts at 0, the Modulus will start as true so the user would get a new life immediately. There is however, a way around this by adding a condition that says score != 0.

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • Also, when looking back at your code, I noticed this:

    ----->LERP_SPD>End_Speed-0.009:

    This won't work for subtracting because it will happen immediately upon choosing a new value (as long as the value is at least 0.009 less than End_Speed). What you should do is:

    ----->End_Speed - Current_Speed > 0 ? (LERP_SPD>End_Speed - 0.009) : (LERP_SPD<End_Speed + 0.009):

    Again, this will test to see if the new value is higher or lower than the previous value and check the LERP_SPD values accordingly.

    or even easier:

    ----->abs(End_Speed - Current_Speed) <= 0.009

    This will trigger when the difference is less than or equal to 0.009.

  • I don't really know much about the lerp function. In my testing to solve this question, I could not get it to count down either. However, if you know how to count up using it, you also know how to count down simply by subtracting the lerp value (which is counting up) from the old wind value.

    Instead of using the lerp to change from current_wind to new_wind, always count from 0 to abs(new_wind - current_wind) then add or subtract the result from current_wind.

    I am including a capx that shows the above directions set into a single action. The page simply allows you to type in a number to lerp to and shows the change over time from the previous number to the new one in a text object.

    There are 2 items in the action which may need some clarity:

    abs() returns the absolute (non-negative) value of the equation in the parens

    NewWind - CurrentWind > 0 ? 1 : -1 means if the difference in the values is greater than 0 return 1, if not return -1. It is called a ternary operator. Google can tell you more if you want to understand it better.

    I hope this helps and good luck with your project.

  • I think it has some potential. I did get a little confused when I was frozen a few times. At first, I thought the game had bugged out but, thenmy wife figured out it was the red light/green light thingies.

    I'd like to see some more levels to play through.

  • You just need 1 more option: (said in a thick British accent) "Hello, did you turn off and back on again?"

    I don't think I could play it too long, but for a 1 time short run I enjoyed it. Of course, having worked in I.T. for many years, it brings back some bad memories so that might be why I couldn't play long.

    I like the graphical style but I think there could be a little more to the game play. Maybe you could have a set of user descriptions of the problem and make them all vague enough that it is still difficult to figure out which solution will work.

    P.S. if you don't get the reference from the first line, look up the British comedy "I.T. Crowd." You know what, even if you do get the reference, look it up anyway. It's always good for a few laughs.

  • You could do it that way or, you could use the Modulus operator (%). You can see more about it if you look it up but this is what you would use for your condition:

    Use a System "Compare 2 Values" event and set the 2 values to the following

    Value 1:

    CurrentCount % 5

    Value 2:

    0

    CurrentCount is the name of your variable and you will want it to start at 1 because 0 % anything is always equal to 0.

  • No worries. I saw your post so I came on to respond but, by the time I hit submit, your post was already removed. Glad you got it working though.

  • Here is a simple capx example for you to look at.

  • I'm not sure why your method is not working but I would suggest not using the Wait action for this kind of event. As it is, your method simple says, as soon as the player stops touching the menu, wait 5 seconds then move up. Not if the player has not touched the menu for the past 5 seconds, move up.

    Instead, use a last touched variable to store a time value and update it every time the menu is touched. Then, your event would just look to see if current time is > lastTouchedTime + 5 seconds.

  • There is a tutorial on how to create a login form here:

    https://www.scirra.com/tutorials/525/si ... l-database

    The steps would be exactly the same. You would need to have a hosted website and mysql database.

  • Can you post your capx? I'll take a look at it.

  • If you mean you want the sprite to face left/right, set the sprites mirrored option.

  • To have a Sprite animation play backwards, set the Speed option on the animation to a negative value. In other words, if you play your animation at 10 frames per second, set the speed to -10.

  • This may or may not help but, this is one thing I have done.

    Instead of anchoring UI items to my window, I place all UI items on a single layer. I then set the layer paralax to 0,0. This makes it so the layer does not move at all when scrolling. When the layer loads, I set the starting position of elements I want to move, relative to the layer size. I have attached a very simple example capx to show you how it works. If you press esc, a text object will drop down from above the screen. Also, there is a bottom bar with a button that will make it expand and contract. The graphics look terrible because I just wanted to throw together a quick example but, you should be able to see how it works. Also, the only thing that is anchored is the box in the upper right but it really doesn't need to be.

    This may not be as flexible or even as good a method as what TheDom suggested, but it is a method I have used that worked well for me.

    I hope this helps you work out some new ideas on how to handle this situation and good luck with your project.

  • You don't have enough rep to post a link so it has been removed.