SpyToy's Forum Posts

  • 11 posts
  • Firstly, I'm assuming your game over screen is a separate layout. You probably don't need to do this - just make it a layer that appears on top of your current layout. Then all you need to do is system-restart layout.

    Alright, so I managed to convert the separate layout into a global layer which works just fine. So I thank you for that tip!! But now I've run into a new issue: No matter what I do, I can't get the 30 second countdown to function, nor the music that is supposed to play when the layer is visible.

    I can't post a screenshot of my programming because I'm on my phone right now, but I have it as this:

    [ Layer 'GAMEOVERSCREEN' is visible ]:

    System; set game over_countdown to 30

    Audio; stop all

    System; wait 0.1 seconds

    Audio; play GAMEOVER looping

    Text; Game over_Countdown: set visible

    [ Subevent; Every tick ]:

    Text; set text to Game over_Countdown

    [ Subevent; Every 1.0 seconds ]:

    System; subtract 1 from Game over_Countdown

    [ Subevent; Game over_Countdown = 0 ]:

    System; Go to TITLE

    [ Subevent; Keyboard; On Space Pressed ]

    [ Condition; Game over_Countdown > 0 ]:

    Restart layout

    ...Any ideas??

  • Hello, everyone! I'm having an issue here that I'm breaking my head over, and what I would like is so simple. I'm trying to make a game over screen- and so far, I have the design and a working 30-second countdown.

    What I'm looking for is a way so that when the player presses the space bar, the game takes you back to the last layout you were in, at the very beginning. The 'previous layout' function works with the specific and manual ordering of the layouts in the Projects bar, which is not what I want. I've also attempted the 'Global Variable: Source Layout=LayoutName' tactic, to no avail. Does anyone have a clue as to how I can go about this? Any help would be greatly appreciated!! Thanks in advance.

  • dropbox.com/s/dkqrwnwdz75qhxm/layoutrooms.capx

    As mentioned above, don't spawn on your exit, or you will collide immediately and trigger the exit on the new layout. Otherwise, you'll need a state variable that keeps track of if you just entered a layout, and add a condition to check that it is false before exiting again.

    Hey, Oosyrag! Your solution worked! It took me a bit to figure out, but it works wonderfully. Thanks so much for the help! Cheers!

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • Hey Spy,

    How do you have things connected up? It sounds like when you go to the new layout you are spawned on the door which is why you are constantly going back and forth between layouts.

    Post up an example of the problem if you can.

    Hey, Genki! The issue I was having was the fact that I had the player always set up to the initial spawn of the first room, when the initial spawn didn't even have to be there in the first place. Kind of hard to explain but basically I had everything wrong. Thankfully oosyrag helped me out! I feel like such an idiot because the process was so simple, hah!

  • Help! I'm in the process of designing an RPG, but cannot seem to program the simplest thing. I would like for my player to move to one layout, and upon going back, return to the first layout from where it came. Whatever I do, the same problem persists; both layouts rapidly switch back and forth, and I'm breaking my head trying to figure this out.

    If it helps to note, the first room has two different paths; therefore, there would potentially be three different spawning points: the initial, the first path, and the second path. If anyone has any solutions, please let me know!

  • I appologize 4 sounding so harsh. But sometimes you need someone who kicks a little.

    Plz test this CAPX trough. I might have forgotten something.

    You will notice (i hope you do) 3 importand things.

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

    1/ Changing direction, velocity and all that stuff must happen inmediatly, and must be able to happen fast. The animations can only happen only once when there is a change in the situation. Thats is why you cant change animations and those other things in the same event. They have a totaly differend ritme. Hence, animations get there own dedicated events.

    2/ Each animation (when its top event aint a trigger) has a 'once while true'.

    3/ Each animation has only ONE event to get it started. No where else in the whole event-sheet an animation has another event that starts it. As you see that is possible using 'else' statements. Those else statements also make it a dang sure thing that there is only ONE animation (out of differend) started in whole that event block. You see ?

    There are things i dont know. Can it attack while gliding ? I supposed it can. But, this must be easy to change for you now. Because you see ALL animations grouped thogher in a big hug.

    I plain love the way how you make it glide, that i learned from you.

    Oh my god you're wonderful, you fixed it ahh! Thank you so much, I've learned a lot! And I'm glad I was able to teach you something in turn as well! Lots of love to you, my friend. <img src="{SMILIES_PATH}/icon_mrgreen.gif" alt=":mrgreen:" title="Mr. Green">

  • In the same tick ....

    19 sets the attack1 animation.

    25 sets the attack1 animation.

    28 sets the attack1 animation.

    At least 2 of those 3 is true, mostly all 3. And they stay true for quite some time.

    So, the animation gets started several times in 1 tick for a lot of ticks in a row.

    Result: the animation starts to playing and never gets passed frame 1.

    Because, before it ever gets to frame 2, its is commanded to start from beginning (frame 1) again.

    And again, and again, and again, and again.

    I would like to see the tutorial, i do not beleive it makes the same mistakes.

    Even if you solve this one thing, the code stays a mess. I expect it to be the same mess in the player movement section.

    I suppose 'fly', 'idle' and 'run' also get started in that section. Meaning without a capx, this is not solvable.

    Excuse me the harsh words, but i suggest: Start over. And use 'Trigger once while true' when needed.

    I'd like to apologize for displaying such a sloppy looking list of events and actions; I am still new to this program, but I do appreciate your assistance. I think I'm beginning to understand what you're saying in regards to the same tick executing the animation three times over. The original tutorial for attacking is here, although I did attempt to modify some things (to my inevitable failure) when programming it for myself. https://www.scirra.com/tutorials/386/how-to-make-a-player-atack

    Now I am having another issue, where he is no longer frozen, but instead the attack animation does not play at all when idle.

    Here is the capx : https://www.dropbox.com/s/9ojwyxzjmq2ybgd/OVERTHROW_REMAKE.capx?dl=0

    ( I tried to make my events neater by adding in another group; I hope you don't mind. )

  • Idle and not attack must be problem at 19 row.

    Just copy it and put new condition or sub event.. Press Z like at 17 row( put this in the new condition or new sub event under the copy of 19 row . You maybe want to get rip off the 2 action

    I'm having a new problem though. After going back and closely looking at a tutorial, I made an attempt to copy it. Now my character responds when I press 'Z', although he freezes on the first frame until i move.

  • Hello! Firstly, thank you for taking the time to read this and consider helping. My issue is, as of right now, that I cannot get my player to attack while idle. When running, if 'Z' is pressed, he will attack, and it will also work while in mid-air, as I wanted it to be. Here is my event sheet:

    Any suggestions on how to resolve this issue would be greatly appreciated.

  • I'm brand new to Construct 2, and I'm trying to make a complex platformer. Smart idea, I know. </sarcasm>

    The issue I'm having right now is related to Power ups. I'm trying to make it so that when my character touches a spinning wrench icon, it switches to him holding the wrench (a different animation), and when he runs, it's playing another animation. However, I want it so that the animation plays for about 10 seconds, then reverts back to the first sprite animations (Idle and Run).

    Please take note that I followed the beginner's tutorial, so his sprite is connected to an invisible PlayerBox object. I've tried duplicating the character sprite so that it replaces the original, but then it gives me problems with the placement (where the duplicate does not exactly follow the PlayerBox, despite me having put 'position to PlayerBox').

    Here is what I currently have in my event sheet:

  • Hello! My name is Samson, and I just recently began using Construct 2. And by recently, I mean yesterday.

  • 11 posts