Gmoney's Forum Posts

  • The game looks great. <img src="{SMILIES_PATH}/icon_mrgreen.gif" alt=":mrgreen:" title="Mr. Green">

    We usually use Families for handling multiple instances of enemies, but it's very important to know how to pick the correct instance when we use them.

    Along with functions and arrays, system conditions will definitely reduce time for developing games, but they're difficult to learn.

    I'm not much of a fan for those features myself, so I don't know much about them.

    But after making so many lines of codes manually using variables, sometimes I feel it would be better for me to learn the features the experts use.

    Here's an example that explains the process of using Families for multiple instances.

    https://www.scirra.com/tutorials/4843/p ... m-a-family

    Look for functions and arrays under Tutorials category, and also visit this page to find frequently asked questions for all topics. <img src="{SMILIES_PATH}/icon_mrgreen.gif" alt=":mrgreen:" title="Mr. Green">

    viewtopic.php?t=63692&start=0

  • You're welcome, J8U5. <img src="{SMILIES_PATH}/icon_mrgreen.gif" alt=":mrgreen:" title="Mr. Green">

    Another method is to use a Pathfinding behavior.

    https://www.scirra.com/tutorials/1118/path-finding

    And.. check this one out as well.

    follow-path-behavior_t65382

  • Hi, Nestorj66.

    All enemy units need to have Hitpoints placed above their heads. <img src="{SMILIES_PATH}/icon_mrgreen.gif" alt=":mrgreen:" title="Mr. Green">

    We can do this either by creating separate group of events for each enemy unit we create, or use Families.

    https://www.scirra.com/manual/142/families

    Here's an example capx file demonstrating the use of a Family named Family1.

    I've placed comments in event sheet 1. <img src="{SMILIES_PATH}/icon_mrgreen.gif" alt=":mrgreen:" title="Mr. Green">

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

    The code looks good, but there's a bug.

    There are two enemies, but if you step on the one close to the wall first, then the bug will occur.

    I think I know how to fix that bug, but I'll need more time to find the answer. <img src="{SMILIES_PATH}/icon_mrgreen.gif" alt=":mrgreen:" title="Mr. Green">

    Maybe another user in the forum can help Nestorj66 with this issue by showing him/her how to pick the correct family member from Family1.

    If not, I'll be back with an answer tomorrow. <img src="{SMILIES_PATH}/icon_mrgreen.gif" alt=":mrgreen:" title="Mr. Green">

  • Oh, ok, Nestorj66. That's good to know.

  • Check this out. <img src="{SMILIES_PATH}/icon_mrgreen.gif" alt=":mrgreen:" title="Mr. Green">

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

    What was updated

    1. Player jumps faster.

    2. Player's jump strength varies based on how long the jump key is pressed.

    3. Player can jump again after stepping on the enemy's head.

    4. Jump strength stays after jump is complete.

  • Please post the C2 capx file. When something like that occurs, that usually means coding was not done correctly.

  • Exactly <img src="{SMILIES_PATH}/icon_e_biggrin.gif" alt=":D" title="Very Happy">, and depending on how long the button is pressed jump that differs the height. Sorry if if not understood before, it must be for my bad English. Really thanks for helping me and being the only person to respond <img src="{SMILIES_PATH}/icon_e_biggrin.gif" alt=":D" title="Very Happy">

    You're always welcome, Nestorj66. <img src="{SMILIES_PATH}/icon_mrgreen.gif" alt=":mrgreen:" title="Mr. Green">

    Your English is perfect. I think it was me thinking too fast. <img src="{SMILIES_PATH}/icon_mrgreen.gif" alt=":mrgreen:" title="Mr. Green">

    Ok, so here's the latest example. I hope this was what you were looking for.

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

  • Check this example out, maroclips. <img src="{SMILIES_PATH}/icon_mrgreen.gif" alt=":mrgreen:" title="Mr. Green">

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

  • You're welcome, Nestorj66.

    Thank you again, apreciate it, but I think that you don't get me ^^'. I know that exists the jump sustain but I don't mean that, well really I don't know xD, I mean when is in a jump on enemy head (like Super Mario Bros 1 or 3 or World), only when the jump is on an enemy head Gmoney

    ok, so what you need to learn is how Player jumps higher in the following condition?

    1. Player jump to enemy's head.

    2. While landing in enemy's head, Player presses jump button again for a long time.

    3. Player will jump higher.

    I just wanted to clarify before I made another example.

  • You're welcome, J8U5. <img src="{SMILIES_PATH}/icon_mrgreen.gif" alt=":mrgreen:" title="Mr. Green">

    All we need to do is arranging conditions, so that the NPC will move according to the arrangement.

    Here's an example

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

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • Thank you! But not what I meant n.n' I meant something like Mario jumps in Super Mario Bros/3/World. That the jump is bigger as more jump key is pressed. In this example jumps higger but not as I say

    You're welcome, Nestorj66. <img src="{SMILIES_PATH}/icon_mrgreen.gif" alt=":mrgreen:" title="Mr. Green">

    Oh, that's easy. All we need to do is changing the Jump Sustain setting in Platform behavior.

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

  • One behaviour 4 everything. Including flying things.

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

    Wow! <img src="{SMILIES_PATH}/icon_e_surprised.gif" alt=":o" title="Surprised">

    I can never catch up with your advanced skills, 99Instances2Go. <img src="{SMILIES_PATH}/icon_mrgreen.gif" alt=":mrgreen:" title="Mr. Green">

    That's an amazing example. (e.g. Pick distance(BadOne.X,BadOne.Y,Player.X,Player.Y)) -> <img src="{SMILIES_PATH}/icon_e_surprised.gif" alt=":o" title="Surprised"> )

  • You're welcome, heyguy. <img src="{SMILIES_PATH}/icon_mrgreen.gif" alt=":mrgreen:" title="Mr. Green">

    I have removed the 'bullet disabled' event from the event sheet, and added Box.Bullet.Speed / 5 on collision with walls.

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

    For the thrown object's overlapping issue with tilemap, I would look into the object's set collision polygon to check first; after going into C2's image editor.

    If everything is found to be correct there, then we'd need to investigate further. <img src="{SMILIES_PATH}/icon_mrgreen.gif" alt=":mrgreen:" title="Mr. Green">

  • Tekniko Gmoney Thanks a lot guys! This helped a ton! So I modified my throw events to work more like Gmoney's capx. Will modify this further with added functions, added variables and other goodies. I want items you can throw to be used as weapons, for puzzles and other sequences. This pink box specifically helps you reach a higher platform but this other throwable items can also hurt enemies as well.

    So the throw works nicer but I now have a bug where eventually my character will start throwing the object in the opposite direction or just get stuck throwing it in one direction. Sometimes this bug will happen immediately, sometimes it'll take a few throws. Here are my events.

    You're welcome, heyguy..!! <img src="{SMILIES_PATH}/icon_mrgreen.gif" alt=":mrgreen:" title="Mr. Green">

    This method will correct the throw bugs.

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

  • You're always welcome, heyguy..!! <img src="{SMILIES_PATH}/icon_mrgreen.gif" alt=":mrgreen:" title="Mr. Green">

    I would unpin the barriers once one of them hits the wall.

    Here's an example of the unpin method.

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

    The basic idea is to use those barriers on the side as bouncing points for just one flying enemy only.

    Once the enemy gets destroyed, then I would destroy the barriers at the same time and move on to the next enemy.

    Since the game's canvas is much larger than the (500,500) size used on the example capx file, the correct way of handling the unpin would be..

    1. Immediately unpin the barrier that hits the wall.

    2. Unpin the one didn't hit the wall.

    3. When the Player moves away from the wall, then pin again.

    I would use a variable for this method as well. For example..

    a. Dropped = 1 when the right side barrier hits the wall and unpins from the Player.

    b. When Dropped = 1 occurs, the left side barrier unpins at the same time.

    c. There should be another variable called DistanceFrom and it's set to Player.x's location after dropping the barriers.

    d. While Dropped = 1, when DistanceFrom becomes -50 or so, meaing Player's X moved away from the wall 50 in the amount of 50 pixels, then Pin those barriers again to the Imagepoint 1 and 2.

    4. This way, the Player will always have the wall while the Enemy is chasing and hovering above, even after hitting the wall.

    In order to prevent the enemy from chasing the Player forever and interfering with other enemies, I would..

    1. Set a variable of EnemyPosition and trigger only once to record Enemy's X and Y position when its line of sight activates.

    2. If EnemyPosition is bigger than a certain number of pixels, meaning the enemy was following the Player for more than that number of pixels (e.g. 350), then Enemy will lose line of sight and move back to the EnemyPosition.

    Just an idea, but they should work.