kittiewan's Recent Forum Activity

  • Your capx is pretty involved. Can you provide a brief description of what you are trying to achieve?

    Is the problem you're having that the level goes black and all that is visible is a couple of text objects? Because that is what is happening for me.

  • Okay, here it is. As I said, I didn't make all of the changes so that you could see how it works.

    Modify the MusicDictionary Events to include an action to add an entry for every layout that you want to play music by copying and pasting each and changing the name of the layout and the name of the music.

    Then for each level you want to play music, open the event sheet, right-click to include the Music Loader Events event sheet, delete any old on start/end of layout events to play/stop audio.

    Milk of Ultra Violet V2.capx

    I didn't get a chance to go through the whole thing, but from what I saw, very interesting style, looks like it could turn out great!

    By the way, when you get a chance you should rename your sprites to have more meaningful names instead of sprite<number>. You'll find it much easier to work with.

    Also, in part because they aren't very attractive, but mostly because it is hard to control their size and position, you might consider eliminating the Button objects and using sprites for the buttons instead. (See my last example with the pink circle "buttons" to see how to do it. this is more work than renaming the sprites, but again may be worth it.

  • Okay. I've made a model to show you what we're going to use for your project. It is much simpler than your project, so it should be easier for you to understand. And you need to understand it because otherwise if you break it you'll have no clue how to fix it. I plan to write up a tutorial for this project, but I don't want to make you wa

    MusicDictionary.capx

    Open it up and run it. You'll see the layout name (Level 1) and four circle buttons. Click on a button and it takes you to the corresponding level (level 1, level 2, level 3 or level 4.) Notice that the music changes each time you change levels.

    Now look at Level Events, which is the event sheet for all of the levels. There is no code to start or stop the music.

    It is all handled in the two included event sheets you see mentioned at the top. The first of the included event sheets puts the names of the layouts and the music they should play in a dictionary. This included only needs to be included in the event sheet for the first layout in your project (your phone layout.)

    The second included event sheet uses the name of the current layout (LayoutName) to play music that it looks up in the dictionary. This event sheet has to be included in the event sheet for every layout that uses the dictionary to lookup and play music.

    So what does this mean to you?

    It helps you organize your project. It means you only have to go to one place to set the music for all of your layouts, much like the list I had you make out. And once you've included the event sheets to load the dictionary and play the music, you don't have to worry about them anymore!

    Now open up MusicDictionary Events and examine it. You'll be creating a Music Dictionary action for every layout in your game. I'll create a few of them for you and you can make the rest so you'll know how to do it.

    I'll also add the event sheets to a few of your layouts and you can do the rest, again so you'll know how to do it.

    By the time you've read this and looked at the project I hope to have your revised project up.

    Oh, and if you look in the forum in Kyatric's How do I Frequently Asked Questions, you'll find Countdown examples.

  • You are no doubt feeling overwhelmed right now, but with a little organization things can become much simpler. Yes, I can help you, but you have to answer a few questions and layout a plan before we jump into fixing the project:

    1) Are you using the free or paid version of Construct 2? If you are using the free version, I'll make sure my suggestions only use features found in the free version.

    2) What kind of game is this? Is it simply the jukebox, or an interactive book, or is it more of an adventure game? The reason I ask is that if all of the levels except the Tracks level behave in the same way, you can have just one event sheet for all the ones that behave the same. (But if they are all different, there is still a good way to simplify things.)

    3) Can you make a list of each piece of music and the layout that it goes in? Once you have this list, I'll show you how to put it into an array or dictionary, and then you can easily grab the right piece of music from any layout.

  • Whew! You say that your layout is smaller than your window, but thankfully in your project that is not the case.

    Keep in mind that WindowWidth and WindowHeight are the dimensions of your view window, and (scrollx,scrolly) is the center of the view window over the layout.

    So to keep from responding to touches outside the view window add the following conditions to each of the events that handles touch:

    touch.X < scrollx-(WindowWidth/2)

    touch.X > scrollx+(WindowWidth/2)

    touch.Y < scrolly-(WindowHeight/2)

    touch.Y > scrolly+(WindowHeight/2)

    Here is the modified capx:

    Pan_Fix.capx

  • I'm not sure I followed 100%. It would be much easier if you could make a simplified capx that demonstrates the problem.

    Would it help if you make use of "temporary" arrays, and loop through TheStack looking, for example, for those UIDs where Y=1 and pushing them onto the new array? That gives you an array with just the qualifying UIDs to look at. Then you could loop through that array, and for each UID compare the character's CurrentLocation to whatever you want to compare it to. When the next turn starts, clear the "temporary" array and start over.

    How is CurrentTarget selected for each character?

  • You beat me to it, Kyatric. Here is an example that does just that.

    PlayStopMusic.capx

  • Sure. I'd be interested. I don't know that Construct 2 is quite ready for using composite characters yet, but I'm confident it will be.

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • The tutorial morphed into something a little different. Rather than spawning the map locations they are placed and ... well, just go take a look.

    Making an Interactive Treasure map

  • Laurent - To make the X interactive just spawn a sprite at that location that triggers some events when it is clicked. I'll add that to the tutorial.

    - Glad it is what you had in mind. I'm almost done with the tutorial project. Just going to add the X hotspot Laurent asked about and then write the actual text.

  • The flashlight and effects examples pretty much show what you need to know, but here is an example with a complete treasure map on one layer, and a blank map (just the second frame of the default map animation) and view hole sprite (with effect set to Destination out) on another layer which has Force own textures set to Yes.

    Where ever you touch the map a view hole is created so that the player can see the completed portions of the map. There is a fade behavior on the view hole to make it fade in gradually just for kicks.

    Of course if you want to expose certain locations on the map, you would carefully position the view hole rather than creating it where the player touches.

    treasureMap.capx

    EDIT: I'm making a quick tutorial right now that goes into a little more detail about placing points of interest and exposing them through events. Should have it done by tomorrow.

  • To create a visible arc path just have your player character spawn a small trail sprite every tick as he moves as in the following:

    BunnyTrail.capx

    I have a fade behavior on the trail sprite, but you don't need that if you want to keep the trail around long enough to try aligning the animation.

    As for aligning the animation, there are several events that occur in a platform behavior jump: jump, fall and land. You can play different animations at each of these points. In the example I gave there is a test to see if player is moving. There are similar tests to see if player is jumping, falling or landing.

    These are non-looping animations, and there should be some overlap of the different poses. So, for example, the jump animation might include the squat, leap and the height of the leap frames. The fall would include the height of the leap and the fall frames. The land would include fall and land frame.

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