skymania's Recent Forum Activity

  • I do realize that the conditions will lead to the formation of an endless loop. How should I place the conditions to avoid overlapping of the apple "upon being created" only?

    (this event is a sub-event of a function, for some reason I cannot employ the condition "apple on created")

    [EDIT] I just realized if I don't use a while and put call on function "generateApple" as the action for the overlapping OR block conditions then it will create a loop until the apple is in a satisfying position

  • I simply put 'overlapping at offset with snakehead' OR 'overlapping at offset with snakebody' OR etc. (same condition with the other sprites which I don't want to be overlapped with)

  • To repeatedly spawn/destroy apples until it is at desirable distance from other objects, I need to use While loop right?

    However, when I tried including While, the game hangs upon collision between snake and apple

  • I'm trying to make a classic snake game. Upon being eaten by the snake, the apple is supposed to be regenerated at a random location. However, I don't want it to overlaps snake head / snake body / other sprites on being created. What condition should I include to make this happen?

    For a "GenerateApple" function, I plan to first randomly create a new apple

    Then, I will sub-event the 'Or' overlapping condition (for the various objects) under a 'While' condition to keep destroy -> regenerate an apple WHILE unintended overlapping happens

    Will this work?

    Thanks a lot.

  • If we allow the speed of the snake to increase as it gobbles up more apples, then the distance between adjacent segments will also increase.

    I tried to correct this by changing the array update expression to

    Pos.At(MaxArrayW - 1,0) + (PlayerHead.X - Pos.At(MaxArrayW - 1,0)) / PlayerHead.Bullet.Speed * InitialSpeed

    (in a way to generate a Pos array which tracks the x y values as if the snake's speed remains at InitialSpeed)

    but it doesn't seem to do the trick.

    Could someone pls give me some suggestion?

  • You're a lifesaver!

  • Really appreciate your insight ! I was under the impression that all the events under the "attacks" group would be resolved before moving on to "cooldown" group

    I figured it would be fine to transfer the "move"-related events (aside from the "press key" one) down to "cooldown" group. However, I'm just wondering if it's possible to inactivate a single event instead of an entire group?

    Another tiny point if you don't mind. For each of the 2 characters, I added animations for all 8 directions. However, the animations only work when the sprites move in N S E W directions, and not the 4 diagonal directions (static at 1 frame only).

  • I managed to rectify Event 26 by following your advice, but am still struggling with the other 2.

    Event 62: I destroy ekansmove becos I don't want the move to keep moving even after hitting a character. However, after I disabled that action as per your guidance, the move still flies past pichu. I did check the size of the collision polygon, and it should be at least as large as the images themselves.

    Event 65: The move should be destroyed after flying for some distance without hitting any character. It doesn't.

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • Oops so sorry about that. I've changed the setting!

  • Hi all,

    The capx. file can be found in the following link

    https: //drive.google.com/folderview?id=0B_aNwhmNZ_jKM3MxRWZNSDl0LVE&usp=sharing

    (pls remove the space after "http:")

    I'm very new to Construct 2, and I really need help with the following issues:

    Event 26: It's supposed to prevent the HP from dropping below 0, but it doesn't seem to work. If pichu attacks after ekans' HP drops below zero, it will keep dropping.

    (I destroyed the animation sprite, and not the moving sprite (i.e. Ekans) because I want to retain the MaxHP variable. Otherwise, the HP displayed in text will be 0 / 0. Should I make the HP variables "global" instead?)

    Event 62: The events work fine when pichu attacks ekans, but ekans' attack move just pass right through pichu without causing any damage, or causing the sprite to flash

    Event 65: This doesn't work either

    Any help, tip, guidance will be very much appreciated.

  • Did anyone manage to figure out what was wrong with my events for point 1 and 3?

  • Thanks for your suggestion.

    Actually when I pinned it to "Pichu" it worked just as fine. After all, the animation is already pinned to the moving sprite I guess.

skymania's avatar

skymania

Member since 13 Dec, 2015

None one is following skymania yet!

Trophy Case

  • 9-Year Club
  • Email Verified

Progress

10/44
How to earn trophies