brunopalermo's Forum Posts

  • Use an array as inventory and circle through array items when clicking the box.

  • I made an example...

    You can check a preview here:

    http://examples.gamesintheattic.com/platforminertia/

    and get the .capx here:

    http://examples.gamesintheattic.com/platforminertia.capx

  • caiorosisca Actually, this wouldn't work. He must add together player velocity and platform velocity for both axis (horizontal and vertical) or else the player object would only move together with the platform object but wouldn't be able to move on it. In other words, this solution would work exactly as a position pin.

  • But, wouldn't pin keep him from moving the object on the platform (ship)?

    As far as I understood, he wants the avatar to inherit the vertical and horizontal speeds of the platform, so it doesn't fall behind it, while allowing him to move the avatar on the platform itself.

  • Construct 2 has a "time" System Expression which is NOT reset when changing layouts and represents the number of seconds since the game loaded, so it would work between layouts put wouldn't persist if you leave the game.

    I'm not sure there's an expression to get the actual time in Construct 2, but you could call a php and check the server time to get it. Thus you could store server timein a Webstorage object when closing the session and compare with server time next time you load the game. While the game is running I would use the time object, though, to minimize server traffic.

  • A .capx would help...

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • You could use the pathfinding behaviour, but don't forget to add some decision making to the enemy car, vary it's speed, etc. Otherwise it will just move constantly following a path: boring!

  • Call a Game Over layout when you lose. Use the Webstorage object to save a highscore and compare current score with it to check if you have a new highscore.

    This tutorial teaches the basics of Webstorage: https://www.scirra.com/tutorials/266/we ... nformation

  • Technically you can, but it's not that easy. Start reading this:

    http://www.extentofthejam.com/pseudo/

  • I'd use an instance variable, heldWeapon or something, that is initially set as -1 and, when the player picks a weapon, it's set with the UID of the weapon instance he picked (making it easier to destroy afterwards). Also, when picking a weapon, you would check if heldWeapon is greater than -1 and, in that case, you would destroy the held weapon (using its UID) before picking the new one. If you have some kind of drop action it would trigger the destruction routine and set heldWeapon back to -1.

  • Good to know it's PV in French too. These latin languages...

  • As far as I got it he wants the regeneration by time to be limited to the MAX, which goes unchanged forever. When you get the bonus for killing an enemy, you would go beyond that MAX, but, once you're down to below MAX, regeneration would only take you back to the original MAX value...

  • I believe PV means HitPoints. He's probably portuguese or spanish speaker.

    Like Jayjay said, Shoy, you should create a Global or Instance Variable (which in fact would be a Constant), called MAX_PV, and set it to 100.

    When you're adding PVs because of time, add a condition, before adding, which checks if PV <= MAX_PV and only add PVs if current value is lower than MAX_PV.

    When receiving the bonus for killing do not compare against MAX_PV, so you can add beyond that value.

  • I believe this control of yours is not as intuitive as you might think...

    If facing was also controlled by the keyboard (left & right arrows) I would agree with you. But with facing being controlled by the mouse, moving with up & down feels terrible.

    Anyway, here's the capx:

    http://examples.gamesintheattic.com/ghost_shooter_custom.capx

    (For some bizarre reason I cannot attach the capx to the post)

  • Then you're not really comparing numbers, you're comparing strings.

    You can use a repeat loop with a count of len(string1) and compare each item in the string with the corresponding value on the other using mid(string1, loopindex, 0) and mid(string2, loopindex, 0).

    Example:

    This example will return 1 if the numbers are the same or 0 if they're not.

    You just need to check if "Function.Call("nameOfYourFunction", str(firstVariable), str(secondVariable)) is equal to 1 or 0 and show your message if it's 1.