skymania's Forum Posts

  • 14 posts
  • 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).

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • 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.

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

  • Hi all,

    I just started learning Construct 2, and have been through some of the beginner tutorials. The following link is what I have managed to make at the moment (sprites and images taken either from the tutorials or from spriters-resource.com)

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

    (please remove the space after "https:" for the link. I'm not permitted to post it in full)

    At the moment, there are 3 issues which I need help with:

    1/ Player(Pichu):

    I attached animations for 8 directions (for both "walking" and "not walking" states). Most of them seem fine, except the "walking" animations in diagonal directions (NE,NW,SE,SW) which appear to display only 1 frame (looks static) instead of 2.

    2/Pichu attack animations:

    I also pinned the attack animation to the 'movement' sprite (I planned for the move to be discharged AROUND the sprite). However, as it turned out, after being spawned, the move animation will stay there and fade. Is there any way to make it fade while still wrapped around the moving sprite?

    3/ Enemy(Ekans):

    I managed to execute the Waypoints method for AI movement as instructed in the tutorial. However, I am still struggling with Ekans's 8-direction animations since its movement is Bullet and not 8Directional. Could anyone please suggest what I can do to better manage Ekans' animations?

    Thank you all in advance for your kind suggestions (and for being patient with my long post).

  • What if I want to set x to floor(random(1,8)) EXCLUDING the current x (1 <= x <= 8)?

  • 14 posts