SullyTheStrange's Forum Posts

  • Try saying this:

    • Set Arrow angle to "angle(PlayerShip.X,PlayerShip.Y,EnemyShip.X,EnemyShip.Y)"

    That way it shouldn't matter where the arrow is since it isn't part of the equation. Lemme know if it works! <img src="smileys/smiley1.gif" border="0" align="middle" />

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • First, you'll want to provide as much info as you can: your OS, graphics card, and what version of Construct 2.

    Second, you'll be told to try updating your graphics card drivers. That fixes a surprising amount of problems like this very one.

  • Hey sbakht, welcome to the forums!

    How are you making the ball move? The simplest way for something like this is to assign it the Bullet behavior. That behavior has a setting on the property bar on the left called "bounce off solids?", which if you set to yes will give you what you're looking for. All you have to do after that is assign the paddles and the top/bottom walls the Solid behavior. Leave the left/right walls without it so the ball won't bounce off of those.

    Lemme know if you need more of an explanation, or an example file to show you what I mean.

  • I'm pretty sure it's a bug... But until that gets fixed, one way to get your hack solution to work is by adding a blank frame at the end of the animation, then check for when it hits THAT frame. That allows the second to last frame (which previously WAS the last frame) enough time to play out properly.

    At least, that SHOULD work... don't do angry Donkey Kong dances at me if I'm wrong. <img src="smileys/smiley6.gif" border="0" align="middle" />

  • Well, I dunno exactly what you mean Yann, because like I said... the first version you gave me works perfectly. <img src="smileys/smiley17.gif" border="0" align="middle" /> It doesn't have to be absolutely flawless anyway, since it's for a minor feature in a minor game that I have to finish building for Thursday.

    So uhh, thanks a bunch! <img src="smileys/smiley36.gif" border="0" align="middle" />

  • I saw your post pre-edit, Yann, and already put it in and it looks like it's working perfectly. What's the problem with the first version? <img src="smileys/smiley5.gif" border="0" align="middle" />

  • Oh, duh, forgot to say I also tried that. That screencap is from a barebones capx I was using to test stuff.

    The problem is that ObjectA's private var, Overlap, can only tell if it's overlapping ANY ObjectB, not a specific one. So if A is overlapping B1, and not B2, A's Overlap is 1, so for B2 it's constantly setting A's Overlap to 0 (and B1 sets it back to 1) and subtracting from its own Overlap.

    I don't know if that explanation made any sense, but that's what appears to be happening.

    EDIT: I see what you mean about the boolean, but I'm not sure exactly how to set it up... I'll post the test capx if anyone wants to mess with it.

  • That's what I'm trying to do. There's many object A's flying around, and a few stationary object B's. I want to tell how many A's are within a certain distance of each B at any time. It can either be within a certain distance or overlapping an invisible radius, either one will do. This is what I already tried:

    <img src="http://oi40.tinypic.com/5bzfa8.jpg" border="0" />

    That works great... if there's a single object B. Once there's more than one, the counters start flipping out and it doesn't work at all. I can see why it does that, I just don't know how to get around it... Any ideas? <img src="smileys/smiley5.gif" border="0" align="middle" />

  • Very nice example, it's a much more interesting scrolling effect than ScrollTo. My only problem is that once it's on the player and the player's running around, it takes too long to catch up to him. For anyone who wants to change that: I changed the 0.8*dt in both of the "Scroll to" lerp actions to 2*dt instead and it's a lot faster.

    Other than that, great job! <img src="smileys/smiley1.gif" border="0" align="middle" />

  • Haha no problem man. <img src="smileys/smiley36.gif" border="0" align="middle" />

  • No worries, I got yer back. <img src="smileys/smiley1.gif" border="0" align="middle" />

    db.tt/Sz5JgAG3

    In the "Train - Pick furthest from (0,0)" event, I added, "Train - X is less than (scrollx + WindowWidth/2) + 100)". That intimidating expression, "scrollx + WindowWidth/2", just means the edge of the screen, since scrollx is the center and WindowWidth/2 is, well, half of the window's width!

    So if the last train is within 100 pixels of the edge of the screen (but still OFF screen), create the new train car. Seems to work right now, but like I said, it might not work once it gets faster and faster. If it doesn't, just change that "+100" to something bigger, like 500.

  • Hmm. Rather than use a timer, which could potentially mess up, you could check to see how close the last train car is to the edge of the screen. If it's less than 100 pixels, let's say, spawn the next car. I guess that depends on how fast the train is gonna be going. If it's going at lightning speed, you'd have to spawn the new car a lot earlier than that. <img src="smileys/smiley17.gif" border="0" align="middle" />

  • If smitchell wants to have more than one train at once, yeah, he'll need a setup more like that one... As for the check failure, can't help you there. <img src="smileys/smiley5.gif" border="0" align="middle" />

  • Sorry to steal your thunder, cacotigon, but I couldn't resist. <img src="smileys/smiley17.gif" border="0" align="middle" /> I got it working for you smitchell:

    db.tt/Sz5JgAG3

    The easiest setup for this scenario, rather than keeping track of the last created instance, is just picking the one furthest from 0,0. In this case, since all the carriages are in a straight line, that'll always be the last one.

    I always changed the origins of each of the train cars since they weren't lining up properly. It was possible to make it work the way it was before, but this way is much simpler.

    Lemme know if you need me to explain anything else I did!

  • No problem man. Don't hesitate to ask if you need any more help! <img src="smileys/smiley1.gif" border="0" align="middle" />