Questions and Problems [SOLVED]

This forum is currently in read-only mode.
  • First, the download link for my cap:

    http://www.mediafire.com/?73ltjcm5hov170v

    So here's my current problemss:

    1. My piranha enemy goes through walls, despite the fact that my events say if it collides with a solid (which the walls are), it changes the animation to the opposite direction, which should call the event to change it's direction accordingly. But it decides to ignore everything and just go through the wall, not even changing its animation. This is one of the big problems in the game right now (which is why it's up top!), and I have no idea why it's doing this.

    2. I can't find a way to accurately go to the last layout I was on from my pause menu. I put it on its own layout because I plan to have many layouts for this game, and it'd be a pain to put in a pause menu layer for each layout. I tried setting a variable in the ini to the layout, but that crashed when I paused it for some reason. Right now I have it so I can pause, but I can never un-pause. If anyone knows a good way to go back to the last layout I was on, please tell.

    That's all the main problems I have right now (I solved a couple by having a revelation while typing up the problems, but the ones above still stump me). If you can help me with any of them, I'll greatly appreciate it.

    Thanks in advance.

  • 1.

    Notice if you have the piranha going left initialy it works left to right. The solution is to use else in there so that it turns left to right or right to left but not both at the same time.

    EX:

    + Sprite6: On collision between Sprite6 and "Solid"

    + Sprite6: Animation "Swim Left" is playing

    -> Sprite6: Set animation to "Swim Right"

    + System: Else

    + Sprite6: Animation "Swim Right" is playing

    -> Sprite6: Set animation to "Swim Left"

    2.

    When you go to the pause menu just use the system expression "LayoutNumber".

    -> INI: Write value LayoutNumber to item "layout" in group "Player Stats"

    All that's left is to load the "Layout" variable in the pause menu events at the start of the layout. Then it works.

    Here's your cap with the fixes for a visual: http://dl.dropbox.com/u/5426011/fixed/plat.cap

  • Instead of using a separate layout for the pause menu you could also use an "inheritance layer" to keep the same layer between all of your layouts.

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • Wow, thanks for the quick replies, guys!

    I had a feeling there was some silly little thing I was forgetting on the piranha one, but it's crunch time and I was getting nervous.

    As for inheritance layers, holy crap that is an amazing feature. Thanks for telling me about it! That will save me a lot of trouble.

    Again, thanks a lot!

Jump to:
Active Users
There are 1 visitors browsing this topic (0 users and 1 guests)