kittiewan's Forum Posts

  • From the manual System Actions section:

    Set layout scale

    Set the scale (or zoom) of an entire layout. This scales all the layers in the layout, taking in to account their scale rate property.

    Set scale

    Set the scale (or zoom) of an entire layer, taking in to account its scale rate property.

    Set scale rate

    Set the scale rate property of a layer, which affects how quickly it scales (if at all).

    When creating an action, you'll find them in the Layers & transforms group of system actions.

  • There may be a way to do this with one of the custom plugins. Someone else will have to comment on that. But you can add the sprite backgrounds with just a few actions, and adjust them to line up with your text objects to your liking.

    I threw this together quickly, so it isn't pretty, but it should give you the idea.

    textBackgroundSprite.capx

    In the example the text objects are just different instances of the same text object. If you have a bunch of different text objects it is a bit more complicated because you have to do the work for each one of them--unless you have the paid version, in which case you may be able to use a family for all of your text objects.

  • Did you ever play the old Indiana Jones and the Fate of Atlantis (from the early '90s)? It was the first game I played that let you take different approaches to solving a problem. As I recall, you could fast talk your way, punch your way or think your way to success.

    Anyway, it is definitely a huge project! But it sounds great. Will you release it in phases?

  • NotionGames - Very nice! I like your clever use of balloons to save Ubi's butt.

    (I am currently trying to figure out how to make enemies move around and also have enemy birds that fly around. I'll keep looking around and try to figure things out but if you know of any good tutorials with that in specific, please link me. Thanks)

    It's not a tutorial, but check out JohnnySix's Patrolling Example in the Arcade Example Games section. He did an awesome job. (Don't miss the link to download the capx.) Essentially he gave the enemies a platformer behavior and then put moving trigger sprites around at strategic locations. When the enemy collides with a trigger sprite, it triggers the simulation of either platform left, platform right or platform jump depending on the trigger type. What is really clever is that the triggers move, so sometimes they are there and sometimes not, which makes the enemy behavior seem much more realistic.

    There was a simpler, earlier example of the basic technique in the forums, but I can't find it right now.

  • This sounds like a great game, and the artwork looks excellent. I like the idea of a freeform adventure game -- I love adventure games, but it always bothers me when in the typical adventure game you can pick up two objects--say a shovel and a trowel--but can only use each in a particular location. If I have a garden trowel and I need to dig a little hole and the world is about to end, I'm going to try to use it!

    I posted a possible solution to your how to question about enabling objects when the player gets near. I also suggested you include a "reach" instance variable (you could call it anything-maybe proximity would be better?) on your interactive objects. I suggested you could set it to different values so the player would have to be closer to some objects than others in order to interact with them.

    Building on anthonykojima's suggestion about survivors, you might also have a reachFactor property for the survivors which you would use as a multiplier on an object's reach/proximity value. Then different people could use objects when they are closer or farther away. For example, a tall man could change a lightbulb just by reaching up, but a little kid would need to stand on something to reach it. Maybe not the best example for your specific game, but I think it gets the idea across.

  • It sounds like you are creating the platforms outside the LAYOUT, not outside the current VIEW (or as you say, window), so they will never appear. Remember that x and y refer to the location on the layout, and a -y value will be above the layout (which is useful if you have an object you want to fall into the layout.)

    To make an object just above the current view, you need to take into account the current position of the view. From the manual system expressions section:

    scrollx

    scrolly

    Get the current position the view is centered on.

    Try this:

    create object solidPlatform on layer 0 at (random(scrollx-(windowwidth/2),scrollx+(windowwidth/2)), scrolly-(windowheight/2))

    It will create the platform just below the top of the current view so that you can see it. To understand this, you need to know that

    Scrollx-windowwidth/2 is the position of the left edge of the view. scrollx+windowwidth/2 is the position of the right edge of the view.

    scrolly-windowheight/2 is the position of the top edge of the view.

    scrolly+windowheight/2 is the position of the bottom edge of the view.

    Knowing that, you can make adjustments to the locations by adding or subtracting margins as below:

    create object solidPlatform on layer 0 at (random(scrollx-(windowwidth/2-leftMargin),scrollx+(windowwidth/2-rightMargin)), scrolly-(windowheight/2-topMargin))

    where you might set variables leftMargin=20, rightMargin=20 and topMargin=-25

  • There are some situations where trigger objects are the way to go, but for what you describe you can use the distance expression to see if the player is within a certain distance of the other thing. Create a system event using the compare two values condition:

    system-> distance(player.x,player.y,thing.x,thing.y)<=thing.reach

    where reach is an instance variable created on the thing object(s) that contains how close to the thing the player has to be to reach it to interact with it.

    At first I thought it would be better to put "reach" on the player, but you may have to be closer to some objects than others, so it would be better to have it on the thing.

    If you have many different kinds of objects, and are using the paid version you can put all of your interactive objects in a family and create the "reach" instance variable on it. Otherwise you'll have to create the "reach" instance variable on each type of object you want the player to interact with in this way. But that is a lot better than having to create a bunch of trigger objects!

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • The problem described in this thread isn't exactly what you were talking about, but my example shows how to trigger the move of the solid object and move it back the way I described above.

    Bounce and Jumpthru

  • I think you could make it with Construct 2, but if I were trying to make it, I'd try doing some simpler things first. Best to vent your learning frustrations on projects you don't really care that much about.

    Also, if you do a number of simpler projects to begin with, you may end up finishing your big project sooner because you won't make so many false starts.

    Re your questions:

    1) Selecting objects - All of this is straightforward with Construct 2.

    2) Gravity - You can change gravity of objects that have the physics behavior and objects that have the bullet behavior, but it sounds more like you'll want physics. You can combine behaviors, but sometimes you have to disable one behavior and enable another or things go sort of haywire.

    3) Weight - you can create an instance variable on an object where you store the weight you assign it, perhaps based on some formula. Then the scale would make use of this to show the player the weight.

    None of this sounds hard to me, but I've done quite a bit of experimenting. Check out the tutorials section and Kyatric's

    How Do I Frequently Asked Questions

    In particular, do the first two tutorials (Ashley's Beginner's Guide to Construct 2 where you create the Ghost shooter and Velojet's tutorial on making a platformer.) Even though you might not be building one of these types of games, they'll help.

    Also examine the Examples that come with Construct 2. You may find the physics examples interesting, but it's worth going through them all, IMO.

    Eventually you might take a look at Sqiddster's How to make a gravity based platformer. Certainly go and play the game on the arcade (under Rotary Games, I think) to see some ideas about working with gravity.

    Good luck!

  • Ugotsta - I'm glad you posted the canvas solution. I thought it was possible with canvas, but had no clue how. Quite cool!

  • You can create a solid platform and move it out of the way when the bullet hits it from below, and then move it back in place when the bullet has moved above it. Not perfect, but works pretty well. There are comments that should explain, but if you have questions, just ask!

    bouncybullet.capx

  • Here is a version doing what sqiddster described--an arrangement of pie-shaped slices. Surprisingly few events.

    UHR_animated.capx

  • If this is a bug (and I think it is) it is relatively minor. The problem is that when you edit the action to change the target of the action to a different object type, it forgets what action type it was which might result in the loss of work.

    The linked .capx contains a sprite, a text object and a mouse object. There are two mouse events, each with an action to set visibility or set position.

    If you edit either of the actions and click [Back] twice and switch the target of the action from sprite to text or text to sprite, then click the [Next] button.

    The default action now reverts to the first action Rotate clockwise instead of what it was originally.

    If the action is a common action between the old target and the new target object of different types, it seems to me that it should keep that action the way it does if the object types are the same.

    The good news is that if you notice and fix the action and you click [Next] again it does seem to remember what you had originally, so you don't lose any work IF you are paying attention. If you aren't you lose your action parameters.

    TextvsSpriteBug.capx

  • There isn't a way to disable the solid behavior, but you can move the walls out of the way for those times when you don't want them there.

    Create two instance variables like startX, startY in the wall object. Then at start of layout set wall's startX=self.x and startY=self.y.

    Then when the player clicks on the other platform, set the position of the walls to something off the layout like

    walls->set position(-500,-500)

    When the player has moved to the next platform, put the walls back in place:

    wall->set postion(self.startX,self.startY)

    You need to take care that the player doesn't get stuck in the middle of a wall when you put them back.

    You also can just move the walls that the player collides with, but it is a bit more difficult to know when to put the walls back.

  • It looks good, Gillis. Really, really, really good!