kittiewan's Forum Posts

  • To get the bullet behavior to move from right to left change the bullet angle of motion by 180 degrees. I think there is an option to not rotate the object.

    I posted a simple endless runner example awhile back asking for help with the jump. You may find it useful. I just move the scenery back to the other side when it goes off one end, but I wasn't trying to make varying platforms at the time.

    Making player surge towards center of window

    There is another example of a vertical scroller here:

    Vertical scroll platform

    As for using arrays, yes, that's the usual approach, however, since you can easily destroy the objects when they get to the other side of the layout, it isn't strictly necessary. You can create a loop to generate the various pieces of the platform with random properties and set it in motion a certain distance behind the last platform.

    Maybe someone has an example using arrays.

  • Welcome to the forums. This is the location for posting questions that you have about how to do things. There is an Official Introduce Yourself thread where you introduce yourself and can read about other members.

    You seem to already have discovered how much useful information there is here. There are lots of examples that show you how to do simple and difficult things.

    And anytime you have a question that you can't find an answer for in the manual, tutorials or in existing threads, come back and ask. Make the question as specific as possible, with an example of the problem if you can, and someone will try to help you.

  • There are so many ways to implement a dialog system.

    At the simplest level you need to:

    1) Trigger the conversation by some event, like clicking on a sprite or one object colliding with another.

    2) In response to the event, use the set text action of a text object to set the text to the desired text.

    This simple project shows a sprite saying different things when it collides with another sprite.

    simpleDialog.capx

    If you want something more involved, my "port" of Mikey's adventure part 2 also has a little bit of dialogs. For example, here is the section dealing with Mikey's conversation with an NPC called Jill. Maybe not the best model to copy, but hey, it was a learning experience!

    <img src="https://dl.dropbox.com/u/57899112/MikeyTalksToJill.PNG" border="0">

    There are also links to several threads in kyatric's (How Do I...) Frequently Asked Questions thread. under the RPG genre section that discuss a more full fledged dialog system.

  • One way would be to create a dictionary containing the forbidden words and then when the text is changed or submitted you'd have to parse the text looking for those words. Maybe using the find() string expression would work instead of full blown parsing. Not too bad if your list of forbidden words isn't too long...

  • I asked for this awhile ago, but instead it seems to have changed from showing the current C2 version to showing the active tab. Neither of them makes much sense!

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • I just used the layer approach for making a pause->resume/restart screen and it works like a charm. It's the way I'd go.

    EDIT: One thing to keep in mind is that sprites on a hidden layer might still be active, so you may either need to move them off the layout when layer is invisible or test to see if the layer is visible before reacting to them. Testing to see if layer is visible is easiest, but the other way isn't hard if you save off object's position as instance variables.

    Also you may need to stop time or counters, so you'd add a test to see if the store screen is invisible before doing some of your statistics keeping.

    EDIT 2: The downside of having your store as a layer is that you have to replicate it for every level, which could grow huge! However, keep in mind that you can create the logic that runs your store in a separate event sheet and include it in the level layout. That can simplify things if you have many levels, since you'd just have to maintain the events for the store in one place. You'll have to be the judge if this overhead of duplicating the store layout is just too much to bear.

  • Your welcome, Delgado.

    naelian - Have you tried loading tiled backgrounds on the fly yet? I have a project in mind where it might be useful, but haven't sat down to try it out yet. I could go from having many layouts to just having one endless one. Awesome!

  • You don't tell a lot about your game, so I'm not sure if you want the distance from a starting point or the distance travelled, which might be quite different if the player can go back and forth.

    Here is an example that uses an 8-direction behavior for the spaceship, but automatically flies to the right by simulating the right control.

    For the distance displayed, the spaceship saves off its starting point and then every tick calculates the distance it has gone from the starting point.

    LongDistanceFlight.capx

  • I've used the method you describe without problems.

    If your background image gets too big, you might want to break it apart. The tiled background is more efficient than sprites, so use it if you can.

    Don't forget about parallax effects. You might want your background broken into several layers so that you can take advantage of it.

    You do have to be careful of putting moving objects, like a player or enemy with platform behavior, in positions where they can get stuck inside of solid objects.

    For this reason, the platformer behavior works much better if it is applied to an invisible sprite object that has the animated sprite pinned to it (or moved along with it) rather than applying the platform behavior directly to the moving sprite, with its changing collision masks that could get stuck inside a platform.

    Ashley's How to make a platform game tutorial is a useful resource.

    Another awesome feature is the ability to change angle of gravity. Sqiddster takes this to the ultimate, as described in How to make a gravity-based platformer

    Just a start. I'm sure others can add to this.

  • Do you really need a button? Can't you just use a sprite and test on touched or on clicked?

    If you really need to make a button object invisible, place it on a layer and make the layer invisible. (I don't think button objects work when they are on an invisible layer, but sprite buttons will work when they are invisible.)

    Here is an example of both:

    InvisibleSpriteButtons.capx

  • I think you're mis-using the dictionary compare value action.

    Instead, use the system Compare two values action to test the length of a value retrieved from the dictionary.

    This event sheet shows both how to find the length and a proper use of the dictionary compare value action.

    <img src="https://dl.dropbox.com/u/57899112/DictionaryCompare.PNG" border="0">

    If you want it for some reason: DictionaryCompare.capx

    (Another thing to keep in mind is that dictionary keys must be strings, so you may run into type mismatches if not careful.)

  • In addition to what hylists said about changing the window size at design time, you can use scale and scrolling among other techniques to manage the "camera."

    One of the first places to look for an answer to a question is in kyatric's (How do I...) Frequently Asked Questions. In this case, look for the section on Scrolling/camera.

  • Thanks for fixing the link, kyatric.

    Another way would be to simply move the cards down in a straight line. You could arrange all of the cards in three columns and then move each card down over time. When a card reaches a certain point at the bottom, move it back to the top. Randomly choose a stopping time for each column, at which point you stop moving all of the cards in that column and make sure the closest card is fully showing in its slot.

  • Like just about everything, there are many ways to do this... Here is a thread that demonstrates a way to make a silly little autogenerated level. (There are actually 3 different examples, but the first one is the autogenerated one. The others also show different ways to go between levels.)

    Create levels and transitions

  • What velojet said, but some things worth trying:

    1) reboot computer

    2) reinstall Construct 2