kittiewan's Recent Forum Activity

  • What Wink said, but you also need to consider the actual player sprite object and how it gets to the new layer.

    Select the player sprite and look at the properties panel. In the first group you'll see a "Global" parameter. If this is "No", which is the default, then 2 things happen:

    a) The player object won't appear on the new layout unless you place it there, either at design time or by creating or spawning it.

    b) The instance variables for that player object are reset to the defaults in the new layout.

    However, if you have global set to Yes, then:

    a) The player object automatically appears on the new layout in the same position it was in in the old layout (but you can reposition it, of course.)

    b) The instance variables that changed in the previous layer retain their values in the new layout.

  • Glad I could help. There are so many different ways to do something, even with a structured tool like Construct 2, that experimenting is really key to understanding. I actually have a fairly complex game in mind that I really want to make, but I'm holding off on making it until I've made a dozen silly little games. Then I think I'll be ready to attack it. So far I'm about 1/2 way there....

  • You're welcome.

    That is a great game. I tried unsuccessfully to find an article I read on the creation of Zombieville USA. Pretty interesting the way they did it. Basically used 2D graphics on skinned 3D mesh divided into bodyparts and animated in Maya. You can find more about it in the Unity3d.com forum if you search for mikamobile and zombieville.

    If you plan to target mobile devices you might consider switching from mouse to touch as your input, but setting use mouse input to yes so that you can still test with the mouse.

    I switched the conditions for mirror because it seemed to me the characters were looking away from direction of travel. Old way is still there, but disabled.

    I also played around a little with the animation speed. If you have already downloaded the capx you might want to download again to see those changes. Basically all I did was create two new instance variables and assign animations speeds to each animation, and set them when the animations are changed.

  • There are many ways to do this. I've included 2 ways in this capx. (One is toggled disabled. They both produce the same result, but there might be a use for each. The first is easiest to understand.

    RandomHealth.capx

    Variables are used for all of the health range limits, so if you want to change the health range levels you just change the values for the globals. In the comments I included your original numbers so that you can see more easily what is going on.

  • I think what you want to do can be achieved, but if I were doing it, I'd get one player doing exactly what I want before I'd try to add in the others.

    When I ran your example, it switched back to the idle animation everytime the characters returned close to their starting point, which is what your events seems to be telling it to do.

    To handle multiple lifebars I added a sprite called lifeline with a pin behavior and had each player spawn one, and then in turn the lifeline spawned the frame and lifebar. Of course you would set the lifeline to invisible for actual game.

    multiPlayers.capx

    As far as the speed, what kind of game is this supposed to be? Is there a reason you can't use one of the standard behaviors, like 8 way or platform to control the current player? (You would disable the behavior on the other players and only enable it on the current player.) For making a prototype that would go much faster than trying to create a custom movement. You can make it look a little cooler by creating custom camera movement using some lerping with scrolling rather than having the lerping in the movement.

    I assume that you've read Ashley's ghost shooter tutorial which is the starting place for understanding C2. It uses the 8-way behavior.

    If your game is a variation of a platformer, have you read velojet's tutorial

    Building a platform game - a beginner's guide? I learned a lot from that.

  • Yeah, I like Construct 2 because it clicks with the way I think better than most of the other tools.

    You're probably right that you are overthinking a bit, but it takes time to wrap your mind around this stuff. In my experience, one has to experiment a bit and break a lot of things before it starts really making sense.

    If you used Bunnystep, you wouldn't be creating all of the platforms. That was just what my example did to show how autogeneration of a level could be done.

    To blow your mind a little more, I present BunnyRun:

    BunnyRun.capx

    Yes. BunnyRun. Heh, heh. It is a combination of BunnyHop and BunnySteps, more targeted to your actual case. There is one layout for the levels, with different backgrounds depending on the level number. Also the number of points required to get to the next level gets higher each level. (the points are sort of like your monster kills needed to get to the next level.)

    Also, between levels there is a store level with its own event sheet. The player does some stuff and then clicks a button to go to the next level. If there are no more levels "The End" is displayed instead of the store, but you could display the store again, or whatever you want.

    There are comments in this one that may help you understand it better.

    As far as the problem you were having with BunnyHop first level, I think you may have run the game after going to a different level, or perhaps I saved it that way. Go to the Level 1 tab and then run the game and see if it is better. You can specify the first layout in the property panel for the project, but when you click the Run button inside C2 it starts with the last level which is very useful if you just want to test that level, but it can lead to some odd behaviors.

    re the txtMessage, you asked where the "complete!" comes from and what does it do?

    It is just a string. You could just as easily say " finished!" or anything else.

    txtMessage "set text to "Level" & LevelNumber & " complete!"

    will just display "Level 1 complete!" at the end of the first level,

    "Level 2 complete!" at the end of the second level, etc.

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • You figured it out on your own. I was just going to point you to this nice example by gammabeam:

    Multiple Resolutions - Solid example

  • What you are doing basically works, but it isn't particularly elegant or efficient.

    I've included two examples for you to look at, including the intermediary screen between levels.

    BunnySteps.capx

    This one only has one layout and one event sheet that keeps getting called over and over, but a new, very simple level is autogenerated each time. The message between "levels" is actually just another layer that is hidden until it is needed. I think there are something like 15 or 16 levels generated before it ends.

    BunnyHop.capx

    This one has 5 different layouts. One of them is the intermediate message layout that is displayed between levels. The other four are different levels. However, there is only one event sheet shared by all of the level layouts, and one used by the message layout, and another exclusively for declaring global variables. Putting the globals in a separate event sheet makes it easier to share the event sheets between levels as well as easier to find and modify the global variables. You could easily add more levels by just creating the layouts named "level 5", "level 6", etc and changing the global variable NumberLevels to correspond to the last level. You also need to set the event sheet for each layout by clicking on the layout name in the project panel to select it and then changing it's event sheet in the properties panel to "Level Events".

    If you like one approach over the other and have questions about it, I'd be happy to try to answer them. Good luck!

  • Interesting. I thought an instance of the object had to appear in every layout where you planned to create/spawn it, but you are right. It only has to appear in one layout and can be used by all others.

    Now that I think about it, I recall what you are calling a template layout referred to as an "object bank" in Construct Classic--probably in scidave's Mikey's Adventure tutorial. Don't know why I didn't make the connection despite Newt's numerous explanations.

  • Kyatric: I used to ignore them too, but right around the time I started hearing the radio signal through my dental fillings I realized that was probably a misguided and possibly dangerous thing to do.

    zsangerous and sheepy: Seriously, there could be characters like a space that don't show up for me but get changed to something else for you (like %20 which gets changed to who knows what. So I made sure the new link is as trimmed as I can get it. What operating system are you using? I'm using Win 7.

    BTW, I used Construct 2 R84 for the example.

  • It's working for me, but maybe there are some hidden characters in the URL that kyatric and my OS ignores. I got a new dropbox link and pasted it in, so you might try once more.

    MonsterTag.capx

  • Are you saying you want a timer that counts down to zero? The game is over when the time runs out?

    Did you see the Time Counter tutorial by CodemasterMike? The link to the .capx file is down in the comments.

    Also he made a clock plugin that does the same things.

kittiewan's avatar

kittiewan

Member since 13 Nov, 2010

None one is following kittiewan yet!

Trophy Case

  • 14-Year Club
  • x3
    Coach One of your tutorials has over 1,000 readers
  • x3
    Educator One of your tutorials has over 10,000 readers
  • Email Verified

Progress

17/44
How to earn trophies