SullyTheStrange's Forum Posts

  • In simple terms: I need help crafting a formula to make an object fly from point A to point B in an arc, and point A and B won't be known ahead of time. And I have no idea how to get started. <img src="smileys/smiley5.gif" border="0" align="middle" />

    I feel like there's a semi-simple solution using lerp, but I'm not familiar enough with it to figure it out. Is that the right way to go?

  • If the sword and bow are two separate objects, the only way to do this would be to use families, yeah.

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • Other people already answered while I was typing this, but I figured I might as well post it anyways!

    • You can jump by pressing Shift, the default control for the Platform behavior.
    • The platform behavior is essentially pre-made code for you; if you want a character that can move around, jump, have gravity, etc, all you have to do is set its behavior to Platform and you're good to go. Otherwise you'd have to create it all yourself! If you click your Platform object and look at the panel on the left side, you can see a variety of values that represent things like gravity, jump strength, max speed, and a lot of other things that you can change to get the specific character movement you want.
    • In this case, rather than have a big tiled background that has all the clouds on it, it might be easier for you to have an empty blue background, with the clouds being separate sprites. Then you can move them using events, and when they leave the screen, teleport them back to the other side of the screen, to give the illusion of neverending clouds.
    • The problem here is the character's collision mask. You can see it by right clicking your character, select "Edit animations", then click the little icon towards the top right that says "Set collision polygon". This determines how your sprite will interact with other solids. See how it's a bit strangely shaped? If that happens, you can accidentally get caught on things like you were experiencing. The best thing to do is to make the collision polygon more of a square by dragging around those little red squares.

    Hope I was clear enough with my explanations, but feel free to ask if I wasn't. Welcome to Construct 2, and good luck with your class! <img src="smileys/smiley1.gif" border="0" align="middle" />

  • It looks like you set it as a tiled background rather than a sprite -- that's probably why. Tiled backgrounds sometimes look different in the editor from how they actually look in-game. If you only want to have a single tree, it's best to insert it as a sprite instead. Much less hassle.

  • I'll see how the For Each Enemy thing works out, but in my project... well, it doesn't seem to be working out. It has a lot of subevents in this one section, but it didn't seem to be remembering the instances it picked in the first event. If I added in the same condition from the first event ("Enemy var = 1") into each subevent, it started working correctly, with no other changes.

    I'd rather not post the capx since this is one I might finish and actually do something with. Again, I'll try the For Each Enemy and report back later. Thanks for the responses.

  • For example, in something like this:

    Enemy var = 1

    ---- Enemy X > 500

    ---- >> Do this

    ---- Enemy X < 500

    ---- >> Do that

    ... will it remember the instances of Enemy it picked in that first event? In my project, I'm beginning to suspect it doesn't. If someone could clear that up I'll know if I'm looking in the wrong place to fix this issue or not.

  • That works perfectly! It occurred to me to try variables, but I was so determined to use the dang Wait action. <img src="smileys/smiley17.gif" border="0" align="middle" /> Thanks a million R0J0, you're a lifesaver as always.

  • Alright, so I have two instances of an enemy. They patrol around their set paths, and after a random amount of seconds in a specified range, they stop moving; then, after another random amount of seconds in another specified range, they start moving again.

    The problem is getting them to move separately. Without any additions to the basic formula, they'll stop and start at the same time, which I don't want. If you add in a "For Each Enemy" condition in the two events that make them start/stop, they do start/stop separately... but things start getting weird. One will start jittering because he's constantly starting and stopping, one of them might stop and never start again... It's just a mess. <img src="smileys/smiley19.gif" border="0" align="middle" />

    db.tt/axLp8Fc3

    Anyone care to take a look? I simplified it as much as possible.

  • Right now, no, there's no way to specifically check for it. The easiest way to set it up so you CAN check is to have a private variable that controls whether or not the sprite is mirrored, like so:

    On Right Arrow pressed

    -- Set Direction to 1

    On Left Arrow pressed

    -- Set Direction to -1

    If Direction = 1

    -- Set sprite to Not Mirrored

    If Direction = -1

    -- Set sprite to Mirrored

    Having a variable like that has plenty of nifty uses depending on what type of game you're making.

  • I was thinking about the sword, but it's supposed to be a stealth game, so I don't want to give the player an easy way to cut down every enemy and not even worry about stealth, y'know? That being said, there's going to be several tools for the player to use instead, like ninja stars, tranquilizer darts, even some magic. One spell I have in mind would let you become an enemy, so if you become a samurai... well, there's your sword. <img src="smileys/smiley2.gif" border="0" align="middle" />

    And hands do magically appear when you need them -- hanging off of ledges, throwing ninja stars -- but I've become attached to the basic ninja being a blob. <img src="smileys/smiley17.gif" border="0" align="middle" />

    I do agree about it being overly green, I had that concern too. More trees would help, but I feel I need to do more than that... I'll definitely be adding some more small touches like flowers, maybe fruit on the trees, maybe little birds flying through occasionally... Again, those will help, but I dunno if it'll be enough. If anyone has any ideas about that, please let me know!

  • <img src="http://oi39.tinypic.com/eti39h.jpg" border="0">

    Click for bigger pic

    I made all the art myself in Flash, which I am by NO means amazing in. If I actually get this to the point where I'd sell it, it would probably only be a dollar, so this isn't meant to be super high quality stuff or anything. It's a stealth platformer where you play as a ninja and, well, be a ninja. <img src="smileys/smiley1.gif" border="0" align="middle">

    That's an actual screenshot by the way -- the game itself is progressing pretty well. I should have a rough demo in about a week or so.

  • That definitely helps, thanks! <img src="smileys/smiley1.gif" border="0" align="middle" />

  • db.tt/bUzylF3B

    Managed to chop out the rest of my project and make a tiny example for what I want to do here. When you press M, the layoutscale changes to zoom out (or in) and the camera (invisible sprite that'll follow the player) also moves, to keep the bottom left corner of the stage completely aligned with the bottom left corner of the screen.

    It... pretty much works. But it's a pretty choppy transition, as you can see. Can anyone think of a better way to do this that would look better while it's moving?

  • I'll join the crowd and throw on some more praise, that's some very clever work there R0J0. I didn't look at the events and I just stared at it bouncing around until I figured it out. <img src="smileys/smiley36.gif" border="0" align="middle" />

  • It was rare when I was the only one. <img src="smileys/smiley19.gif" border="0" align="middle" />