kittiewan's Forum Posts

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

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

  • Why are you using a textbox to display text? It is used to enter text, for example to get player's name. Notice that you can click with the mouse inside the textboxes and they get focus so the player could change the score. I don't think that is what you want.

    Normally you'd use the Text plugin, which is in the same group as Sprite.

    Then if you want to display more than one value in the text object, do something like:

    Text.Text-> "Home: " & Score1 & NewLine & "Away: " & Score2

    Where Score1 and Score2 are global variables (although you could use two instance variables created on the text object, which would be referred to as Text.Score1 and Text.Score2.)

    I put these change in your project.

    While I don't think you'll be using them, I modified your textboxes since they had several problems. (They are hovering up in the sky for now.) The instance variables were type Text, so you couldn't add to them. This is what was giving you big problems, I think. I don't know why it wasn't generation an error. Something to look into. (EDIT: I checked and Add to for a string concatenates to the end of the string.) Anyway, I changed them to numbers and the addition works fine. Then to modify the text of the textbox you were doing strange things with the locations of the quotes relative to the variable names and the & (I think because you couldn't get anything to work.) Also you only need to set the font properties once, so I moved that to on start of layout, instead of every tick.

    Here is the modified project.

    TestScoreBoard.capx

    Looks like it will be a fun game.

  • sqiddster

    Really? I was sure I'd heard of that game someplace...Oh. My bad. I was thinking of deferential and integral caucuses--some sort of fantasy no doubt. <img src="smileys/smiley1.gif" border="0" align="middle" />

  • I agree with you that there is a bug--more specifically, some sort of unexpected interaction between two behaviors--but I don't agree it has to do with the bullet's set angle action. According to the manual:

    Set angle

    If set to No, the behavior will never change the object's angle. If set to Yes, the behavior always sets the object angle to the angle of motion.

    This is not what you seem to expect. You seem to expect the opposite--that if set to No, the bullet's angle of motion will never be affected by the object's angle. That is, for the bullet to ignore the sprite's angle when determining motion.

    Meanwhile, using an animation instead of rotate to make the boomerang might be a reasonable workaround.

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • talca1991

    We don't really know anything about your experience developing games or using C2. I would start with something relatively simple and well known like a variation of Mastermind (aka deduction) or Simon (memory game, play back the music notes) or Rush Hour (a car puzzle game). It makes it easier for people to help you because they know what the game is. When finished, if you are happy with the result, share it on the arcade as an example game for others to learn from.

    Then go for a more unique game.

  • Differential calculus platformer

    Why differential? IMO integral makes a far more interesting platformer.

  • When you want to go from one layout (level) to another, use the System-> goto layout action. If you want to restart a layout, just go to the same layout. I'm trying to think if I have any examples of switching layouts posted on drop box...

    Ah! Yes. Check out this thread. There are three examples I link to. In one example a new level is generated each time in the same layout, and in another you go to one of 6 or so different layouts. The third one is sort of a combination, and I think the best one of the three. But there are many ways to accomplish tasks in C2.

    Creating levels and transitioning between them