InvaderXYZ's Forum Posts

  • I am trying to use this effect on multiple layers, but transparent pixels are just turned black. Anyone know how I can preserve the alpha so transparent areas stay transparent?

    (EDIT) I figured it out. For future reference replace the void main() section at the end of the .fx file with the following:

    void main()
    {
    	
    	vec2 uv=(1.*vTex);
    	vec4 textureColor = texture2D(samplerFront, uv);
    	vec3 tc = (textureColor.rgb);
    	gl_FragColor = vec4 (dither (tc, gl_FragCoord.xy),textureColor.a);
    	
    	if(gl_FragColor.a < 0.5)
    		discard;
    
    }
  • you are using LayerToCanvas / CanvasToLayer correctly as far as I can tell.

    so the problem is either with the origin of the objects or something not being where you think it is...

    you will have to make a small sample file with the two layers and a couple of the objects so we can see what it going on.

    With further testing, I think what is probably happening is that the game is placing the tiled backgrounds correctly, but by the time the Player has reached that part of the map the layer has already been scrolling differently with parallax and makes the objects appear as misaligned... not sure how to account for that.

  • Bump.

  • Hi!

    I am trying to have my game create a tiled background on a Layer with a parallax of 90, 90. I am having trouble placing it at the right position, as I want it to be aligned with objects on layers with normal parallax, but its always way too much to the left/right/up/down etc.

    (320, 288 is the window size, since the array position given is in the top-left corner I added those in as a way of centering it. Doesn't work.)

    I've tried using the LayerToCanvasX and then CanvasToLayer X solution I've seen people use, but I am still having issues. I believe it might have something to do with the position it is currently scrolled to at the time of spawning the object? I'm a bit out of my depth here and I;m not really sure what to do next?

    For context my game randomly generates the map at the beginning of the run, and I want to place a background in a transparent spot (on the layer with 90,90 parallax) behind the normal background (on the layer with normal parallax). That way the background on the bottom scrolls differently than the background on the layer above, giving the area a bit of depth. I just can't figure out how to calculate the proper position taking parallax into account!

    Can someone help me with this? Thanks in advance, I'm pretty stumped.

  • Got an error after trying to use the Tilemap after adding the behavior. Using the tilemap without the behavior prevents the error.

    Javascript error!

    TypeError: tilegrid[y_] is undefined

    http://localhost:50000/EasystarTilemap_behavior.js, line 267 (col 5)

    This is what pops up when I try to do anything with the tilemap while it has this behavior.

  • You worked on it for 3 years and don't have any spare capx or projects?

    They all got accidentally overwritten by older files somehow. I can't find any version that isn't either corrupted or somehow replaced by an older version. Even on my external hard drive.

  • Hi! I recently opened Construct 2 to find myself having some issues. I later discovered that a lot of my project files had suddenly been lost or corrupted. While I can save things like images and sounds, the event sheets seem to have suddenly been replaced with that looks like to mostly be nonsense. Here are some examples to show what I mean: [Google Drive]

    Is there any way this can be resolved? I don't want a game that I have worked on for about 3 years to have been destroyed by some odd issue. I have a rather recent export, but I don't think that can be turned back into a CAPX/CAPROJ... can it?

    Literally anything would help, again I really don't want to have lost 3 years of work... is there anything I can do? Or am I completely screwed? Thanks in advance.

  • Not quite sure how to report this, but I wanted to say that I think I am still having the issue stated originally in the now closed thread: construct.net/en/forum/construct-2/closed-bugs-22/construct-v269-closes-randomly-144976

    I don't have a consistent way to reproduce this yet, but it seems at random when I paste an event C2 will crash as it did when the bug was prominent in previous versions. While it happens MUCH less than in the old version, I wanted to report that it is still happening for me.

    I expected to paste the events normally, but what happened was that Construct 2 crashed. There does not seem to be any common denominator between the events pasted and it happens across all projects.

    Can't really attack a single CAPX since it happens across all projects. Thanks.

  • Hi Gigatron,

    Any chance of porting this effect to work on Construct3? I'm trying to migrate my project to c3.

    I don't think so, Gigatron said they aren't developing anything for Construct 3.

  • Originally, I was going to post this on the following thread: construct.net/en/forum/extending-construct-2/effects-31/effect-cylinder-map-116594

    but I am unable because it's old, so I am going to mention the OP and ask the question I wanted to originally post on that thread.

    Gigatronsorry for the mention!

    I'm a bit confused, how do I download this effect? (Cylinder Map FX)

    Additional question: can this effect be used from a different perspective? I'm looking for ways to create a cylindrical effect but have the Player be on the inside, so they are able to see the rotating environment around them.

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads

    I can also reproduce this. Ashley would be great if you could fix this incredibly frustrating issue, or at least confirm that you're working on it in any capacity. Construct 2 isn't retired yet and I would consider this a rather essential bug fix.

  • If you need to process pairs of fighters, to decide which one makes a punch and which one gets hit, update animations etc., use this code:

    Oh! That is really smart! Thank you for the help.

  • You start animations in some other events, you can run your code there, or call a function. For frame changes use "On frame changed" event, it's triggered only once for every frame per each object instance.

    I also use this little trick, where I define an image point on one frame in a long animation, to mark it as a "key" frame:

    Thanks for helping me out. I've changed things around and but this into practice, but I'm still having a few issues.

    Normally this event would be nested under the animation playing events, but this is the new version. However, it's become apparent that for some reason when this triggers, only the Fighter_Control created first is picked as the one colliding-- even if it is completely not in motion (Family_Control being just a family with only Fighter_Control). I am... not quite sure how to fix this?

    Additionally, I want to go over part of what I did to fix it just for future reference.

    Essentially I have it set up so that the dictionary stores the previous animation used by changing the key to the current animation name at the end of the first loop; so if the key is not equal to the current animation name then that means this is the first loop of that animation. I use this to reset a bunch of keys back to false, ones that are named to be triggers for this animation and fighter specifically. I have all of the events I need to trigger once only trigger when its false, and immediately set it back to true.

  • Whoa, that's a very cool game!

    I didn't notice you have two very similar looking variables Control_ID and Control_AI.. But I still think the mistake is in the first condition - D_Fighter_Ruleset Key "Animation_Name"=Fighter_Control.Control_ID

    When you have two Fighter_Control objects with different Control_ID values, this condition will pick only one D_Fighter_Ruleset instance, belonging to the first instance of Fighter_Control. If you need to check the dictionary for both fighters, you need to add For Each above the condition.

    The rest of the event looks ok to me, although I would strongly recommend removing Trigger Once from sub-events. Trigger Once doesn't work "per instance", so in case of multiple instances it will almost certainly cause bugs and problems.

    Thank you!

    That makes sense, although what could I use as an alternative? If I wanted to run something only once when the animation starts, or only once when a frame starts what would I use instead of trigger once?

  • It's hard to tell from the screenshot what are you trying to do there. If these events are located at the top level (not nested under a function or something) and executed on every tick, then the problem must be with the condition where you pick dictionary instance - D_Fighter Key "Animation_Name"=Fighter_Control.Control_ID.

    If you don't pick the correct Fighter_Control instance first, then this condition will use Control_ID value of the first instance. And will probably pick only the first dictionary instance also. So if you need to process all Fighter_Controls in this event, you should add "For each" at the top.

    I've uploaded my CAPX, if that helps. [ https://drive.google.com/open?id=1YBoR9H8Qt4lTANerj-xSNh080ign-wNk ]

    Normally, I would use a For Each loop but there are more events I need to use for this where a trigger is involved, which don't work under a For Each loop.