Nimtrix's Forum Posts

  • You could use the clamp expression:

    BoundToWindow.capx (r116)

  • I noticed mine came a few weeks after the join date, maybe it'll show up in a few days.

  • You could always check the angle of the sprite. If you have one straight pipe sprite you rotate, the object's angle would tell you exactly which way the pipe is pointing.

  • The time scale is used to slow down or speed up the game time, so I assume you're talking about the game time itself, the number you get by using the 'time' expression? You cannot reset the game time, instead, create your own variable (call it something like 'timer') and just add 1 to it every second. (or even better, add 'dt' to it every tick)

    Edit: If you want to use time scale, you have to do it with delta-time (dt)

  • I tried this last time you posted, but the result was kind of wonky.

    Not perfect this time around either, but definitely better than last time:

    EggFollow.capx (r114)

  • I have absolutely no natural ability with math, and doing everything the long way helps me understand the math in an intuitive/visual way that is more easily processed by my mind.

    I see, forgive me for assuming you'd want to do it the easiest way possible, it's quite common around here since C2 does such a great job of simplifying things. It's a really good idea to do it all from scratch to get a deeper understanding of things, I often do so myself.

    Is there any advantage to using expressions beyond simplified code (such as running faster)?

    Not at all, except you might get things done in fewer events, which would help people with the free version to keep their project under 100 events. It's pretty much doing the same thing you do with your own calculations, but even if there were a few more calculations to go through, it wouldn't affect performance in any noticable way.

    I can't look at your .capx right now, but for ground rotation I would suggest you use ramones' solution, layer rotation has become much more viable (or at least easier) now that the collision rotates with it. (a few updates ago it didn't)

  • I'm not exactly sure what you mean, but you can make an object spawn an instance of itself on a different image point. Just do Circle -> Spawn another circle at imagepoint 1. (1 if it's the first imagepoint after the origin, you could also input the name of the image point "Imagepoint 1")

    But keep in mind, if you just set this up to happen every second, EVERY circle object is going to spawn a new circle on imagepoint 1. Unless you create some sort of iteration through the IID's of the objects.

  • You need to use an external host, most of us use dropbox (free). There are tutorials on the site on how to upload a file to dropbox, after your file is uploaded you just share the link on the forums.

    If you're looking for a way to have your characters follow the currently active character, check out the "How do I - FAQ" thread in this sub-forum, I'm pretty sure there are some examples there.

  • Hey, if you want to make sure I get the message you could type Nimtrix, which will give me a notification. I saw it anyway though, so here you go:

    goldboyj_edited2.capx (r114)

    First of all, I would stick to power-of-two values for your grid, since all resolutions on mobile or PC are either a power-of-two value or a combination of two power-of-two values added together. (google it if you don't know what that means)

    Notice how all the object sizes in the .capx above are all either 16, 32, 64 etc.. You don't have to do this, but there are many good reasons for using power-of-two values for image sizes and such.

    Also, using a big image as your background defeats the purpose of the TiledBackground object. Split your background into different objects to save space. (large images increase loading time and space requirements)

    You can see how I made a similar background just by using one 64x64 sprite and one 32x32 sprite (could have been 1x1 for that matter). I would recommend you do this instead of making a 800x480 background that covers the whole layout.

    To fix the offset you can see I subtracted the offset-values from the mouse position inside the floor() expression, then added them after the expression. I also added a clamp expression to keep the towers inside the grid area. Also note I moved the image point of all the towers, monsters etc.. to the top left corner.

    Long post, but I think that's about it. Feel free to ask if I left anything out.

    <font size="1">Edit: Noticed some silly typos, had to fix it.</font>

  • If you want to use expressions (Square.X, Square.Y), go to System -> Create object instead of using the spawn condition in the sprite object.

    Or you could use the spawn condition, but you have to select the square first, then go to the spawn condition and select the circle object. Image point you can leave as 0 if you want it to spawn at Square.X, Square.Y.

  • Put them all on a separate layer, select the layer and set the parallax settings to 0, 0. (panel to the left after you select the layer)

  • Well, Ashley has said on several occasions that a debugger is on the to-do list. (it was also one of the options in the new feature vote a while back)

    There are many threads on the subject already, and as newt pointed out in one of them:

    Not sure how a debugger would work since even the preview runs off of another program... your browser.

    However the text object can be used with events fairly efficiently.edited><editID>Nimtrix</editID><editDate>2013-01-02 23:02:45</editDate></edited>

  • if your still having troubles post a capx.

    Sounds like something is a bit off in your project, it would be a lot easier for us to help if we could see for ourselves. If you save your project as a single file and upload it to a filehost like dropbox you can post the link here on the forums.

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • It's actually a bit easier to pick a random object to spawn from, you can just do something like this:

    PickRandomSpawn.capx (r114)

    I'm not entirely sure what you mean by "have the enemy sprite avoid a square when the player is overlapping it", I assumed you meant the enemy shouldn't spawn where the player is overlapping, is that right?

  • Sure thing Kyatric, can't think of any at this moment, but I'll keep it in mind. <img src="smileys/smiley20.gif" border="0" align="middle" /> I'm sure there are lots of great examples that should be on that list.