christina's Forum Posts

  • I wasn't sure where to put this post.

    I made a water effect with refraction, using only built-in effects.

    <img src="https://dl.dropboxusercontent.com/u/28087823/Construct%20Examples/Water%20Refraction/Html/screenshot.png" border="0">

    What I used:

    1. an animated sprite of Perlin Noise (24 frames at 48x48pixels, made seamless in photoshop, frame by frame, with the Filter->Offset method) inside a semitransparent layer with the "Lens" effect.

    2. a caustics sprite set on "dodge"

    3. a semitransparent greenish tiledBackground set to hard light (to set the color of the water and everything in it)

    4. a semitransparent water "surface" sprite

    So it's tileable refractive water, that can affect all layers beneath it, and doesn't use masking or "force own texture" on layer. This is something that can't be reproduced any other way in Construct 2, so far as I know.

    You can check the effect out here:

    live demo

    and you can study the CAPX here (although a little sloppy):

    CAPX

    EDIT: Also the principle behind surface reflection. Read more on the second page of this thread.

    Reflection CAPX

    Reflection Live Demo

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • Thanks for the heads up. I noticed, but I was way more interested in your awesome indexing skills. Don't worry, I won't learn "bad" techniques from you.

    Thank you for the kind comment as well, if you ever need any graphics tips, you know where to find me

  • Oh god, so *that's* what for each (ordered) is! I should read the manual more.

    What an elegant solution, thank you keepee, I'm in your debt!

  • Ah yes.

    You're making a neverending loop.

    Here's what you need:

    1. If the gun has more than 3 bullets in its barrel, then fire one every 0.3 seconds

    2. every 3 seconds, reload the gun with bullets. Until then, nothing happens.

    dl.dropboxusercontent.com/u/28087823/Construct%20Examples/gatling%20gun/gatling%20gun.capx

  • Hi. I have 3 troll sprite instances, on a horizontal platform.

    This is The CAPX

    When ctrl is held and an arrow key is pressed, I cycle between them by adding +1 to the instance number or subtracting 1 from the instance number

    The problem is, if the trolls move from their original positions, they are not in the correct order any more. So by pressing ctrl+arrow, you don't necessarily select an adjacent troll any more :(

    So I found a way to dynamically assign an Xindex number to each instance, by using a loop and comparing the X position to a minimum and maximum X.

    So then, every time I press ctrl, the troll instances get numbered 0, 1, 2 (leftmost, middle, and rightmost troll respectively).

    QUESTION

    What do I do with the horizontal index though? How can I use it to always select the sprite to the right, when pressing ctrl+right, or the sprite to the left, when pressing ctrl+left ?

    I may be overthinking it, so I'm stuck.

    If anyone has any idea, I'd be grateful

  • Yes I'm working on it now.

    I can't get over the fact that the queen doesn't *always* and consistently clear the obstacle when she jumps.

    This breaks my game for the time being, so I'm searching for solutions.

  • thousand apologies for necroing this post, but has this been addressed? I'm seeing height inconsistencies in my really lightweight game. Firefox *and* chrome.

  • So here's what I've been doing for the past three days:

    ludumdare.com/compo/ludum-dare-27

    I love Ludum Dare, and I love Construct 2!

    Tell me what you guys think, and also, if you can think of any way to make troll selection more intuitive, I'm all ears.

    <img src="http://www.ludumdare.com/compo/wp-content/compo2/273708/13139-shot0.png" border="0" />

  • Ramones this is an amazing fix for my situation. No, they will move separately, as in lost vikings/the cave.

    So that's what this needs, an impenetrable wall that keeps the troll there until it has the decency to fall.

    You're a lifesaver. I can't see what you have in trollgap3.capx because you uploaded trollgap2.capx twice.

    But wow!

    P.S. Mad, is this the solution you had in mind?

  • Thanks MadFactory. It didn't work. When I publish it, it seems sluggish for a few seconds, and it doesn't bother checking for collisions (or it does, but it's a super-low framerate). I have no idea why, I have a competent system, and the code is SUPER light. Maybe scaling is doing this? Point + scale*2 ? I have no idea.

    I will use a separate player sprite, don't worry. For the time being it doesn't work with the rectangle.

  • MadFactory nope, doesn't work either. :/ Thank you both

  • Thanks you both.

    Newt, this doesn't work either, the wait function is tied to framerate as well, so it fails.

    I tried it before.

    I even tried "snapping" the troll to the middle of the hole, but that creates other problems that I can't solve right now.

  • Hi guys. I'm taking part in Ludum Dare 27, and I can't get the platform behavior to work right

    CAPX

    What to replicate: Move to the right with the troll, don't slow down for the hole. 30% of the time, the troll doesn't fall in, even though it's 6 pixels wider than the troll's bounding box

    I know it's the built-in collision.. Can anyone suggest a solution?

    Ideally, I would like the troll to fit exactly inside the hole, but I can tolerate a 1-2 pixel margin. Not more than that though. Is it possible?

    Thank you!

  • newt you lifesaver :)

    It seems however that min=0 means 0 and min=1 means 10 and min=2 means 20

    cow_trix are you sure you're not multiplying min*10 somewhere inside the plugin?

  • newt you're right! The example made me think the number is each time you hit the generate button.

    Oh cool, this is perfect. Do you maybe know what RandomPlus-> Set Count to 0 means? It doesn't seem to do anything

    Edit: ah got it, it returns the N randomly seeded number.

    Thanks so much newt!