brunopalermo's Recent Forum Activity

  • 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.

  • If none of them is a Global or Local Variable, like, if you want to compare the result of two equations, you may use System > Compare two values.

  • By the way, I put together a tutorial teaching how to do this "the proper way"...

    https://www.scirra.com/tutorials/1050/basics-of-circular-motion

  • Not sure if this is what you want, but I created a working example at this url:

    http://examples.gamesintheattic.com/cloneobject/

    You can find the capx here:

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

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • I put the wait event inside the On animation finished. For some weird reason having it on the other event, which I deleted, was creating a quick loop. O.o

  • part12studios

    For the "if distance" part you must use System>Compare two values

    First value is the distance(Touch.X, Touch.Y, Box.X, Box.Y)

    is Less or Equal

    Second value is the maximum offset. i would use a global variable maxOffset and set it to whatever you think is the best value for your game.

  • Check it!

    [attachment=0:1ri78cxq][/attachment:1ri78cxq]

brunopalermo's avatar

brunopalermo

Member since 7 Jun, 2013

Twitter
brunopalermo has 6 followers

Connect with brunopalermo

Trophy Case

  • 11-Year Club
  • Coach One of your tutorials has over 1,000 readers
  • RTFM Read the fabulous manual
  • Email Verified

Progress

14/44
How to earn trophies