brunopalermo's Recent Forum Activity

  • Hey Braus!

    The easiest way, considering how it is implemented in this tutorial, would be to create an instance variable (text) for the Grid object called "position" and give it a value equal to the correct letter/piece for that position. So, first Grid on top row would be A, the second B, the third C, etc. Last grid is empty, so its position variable would be blank.

    Then, every time you reposition a piece (on the click event) you would call fuction similar to this one:

    EDIT: Here's a capx, so it's more clear.

    https://www.dropbox.com/s/r8rnbl1128oa9 ... .capx?dl=0

    I didn't implement the whole game, just the victory condition. Just drag all letters to the grid objects in the correct order. If you want to test, drop one letter on the last grid, which should be empty, put all others on their correct positions and then drag the last one to the right place.

  • Hi AmpedRobot!

    The problem has nothing to do with angles. Actually, they're not even being checked at that moment. It's just that, when you go backward you can actually go beyond your PlayerYBottomBoundary variable. Because of that, the condition before the angles (Y < PlayerYBottomBoundary) prevents the movement.

    That happens because when you move forward or backward you check for the boundary BEFORE moving the ship but without taking in consideration that the movement itself may take the ship over that boundary. In order to correct this you should create a cap that makes Y equal to the boundary whenever it goes beyond it or consider the distance moved when checking the boundary. Both solutions would work fine.

    That said, I would strongly recommend that you do 3 things:

    1. Review your code, because it's very dirty and very confusing and this will probably bring you more trouble in the future. Also, a lot of the stuff you're trying to do could be done in better, simpler ways.

    2. Reconsider the controls for your game. From a game design standpoint they are terrible.

    3. Be a little more friendly in these forums. People are here to help because they want to. They don't receive anything to do that, so, a little more politeness might make people more inclined to help.

    Here's a screenshot showing my position and the boundaries. Ignore the position of the buttons. I just moved them to make it easier for me to control the ship.

    Hope this helps. Cheers!

  • Still can't download it...

  • Your capx link is broken. Fix it, please.

  • If the sprite itself is irrelevant, why not using several sprites as imagepoints and make them move in an ellipsoidal path?

  • I know it's not ideal, but, could you rotate it by using an animation? That way you would just squish it normaly and play the animation.

  • dop2000

    Yep. It is. This was more an exercise on "can I do that?" than a "hey! let's use it!", lol.

    There are probably better ways to do that using a plugin that can actually draw lines or something like this. Using that much sprites and the recurssive function will always be heavy on cpu.

  • Been playing with it for a while and added some forking... Not perfect, but it looks more like lightning now.

    https://www.dropbox.com/s/uxl72vng4n6jw ... .capx?dl=0

    Cheers

  • Thanks! Anyway, it's Jim Bumgardner's work. I just ported it from actionscript to construct.

  • Hey mdvgames!

    I just implemented this example https://krazydad.com/bestiary/bestiary_lightning.html in construct. Check the capx below, play with it and if you need any help, just let me know.

    DEMO: http://constructgamelab.000webhostapp.com/lightning/

    CAPX: https://www.dropbox.com/s/az5gk7m9s6wql ... .capx?dl=0

    Hope this helps. Cheers!

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • It's working fine. You're probably testing on a desktop.

    While the Touch on a touch-enabled device is recognized both as Touch and as Click, a mouse click, on a non-touch device, is only recognized as Click. So. If you test on a desktop computer with a mouse, the Touch event will never be activated.

    Try going to http://constructgamelab.000webhostapp.com/test in a smartphone and you'll see it working.

    cheers.

  • Hey !

    Your code seems to be correct. No idea why it's not working. Can you share a capx or something?

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