DaveSilver's Forum Posts

  • Okay, that fix worked. So from that fix am I right to assume that the Jump Thru platform was catching onto the various collision points on my character and they were causing it to think my character was still standing on top of it?

    In either case, thanks for the help

  • Roccinio, thanks for the help, your solution worked perfectly.

    I do have one other question though which is somewhat related. I created an object with the Jump Thru Behavior and noticed some strangeness when using it. Essentially the character is able to stand on the vertical middle of the platform. You can see what I'm trying to say in this gif.

    <img src="http://i.imgur.com/oJ8wVqE.gif" border="0" />

    I basically just want to know if this is how Jump Thru platforms are supposed to work, and if it can be changed so it doesn't do this. Let me know, and thanks again for the help.

  • So I'm trying to make a basic platformer and right now I'm working on animations. The problem I'm having deals with the falling animation. For some reason my character will get stuck in an infinite loop between the standing animation and the jumping/falling animation when he is on the ground not moving. I'm not sure why it's happening and have tried a number of different changes to the event conditions to fix it, but none have worked.

    I think the issue could be related to the animation frames themselves, or to the collision detection, but I tried modifying them a few times to no avail. If anyone knows how this problem could be solved I would greatly appreciate it.

    Here is a link to the capx.

  • Hey I really like your plugin and am curious if it's possible to make it so that a line will stop drawing when you hit or intersect a specified object. So let's say I had the player, an enemy, and a wall. I want to make it so that a line will be drawn between the player and the enemy, but the line will immediately end when it hits the wall. So if the wall is between the two, the line will stop drawing at the wall. Do you know of any way I can do this?

    Any help would be appreciated.

  • Link to .capx file (required!):

    Here is my .capx

    Steps to reproduce:

    1. Run game

    Observed result:

    My game is a Match-3 puzzle game and neighboring Blocks are being spawned with the same colors.

    Expected result:

    I created a function which is supposed to go through the Blocks and ensure that when they are initially created there are no Blocks of the same color next to each other. The function seems to be running based on the debug work I've done, and was working perfectly in R139, but it is no longer working after updating to R143.

    Browsers affected:

    Chrome: yes

    Firefox: yes

    Internet Explorer: yes

    Operating system & service pack:

    Windows 7 64-Bit, Build 6.1

    Construct 2 version: R143

    So this isn't a bug I really need to explain how to reproduce. Like I said earlier the bug is an issue that's only come up after updating to the newest build. I built this game primarily in builds 132-139 and never had any issues with my "RemoveSpawnedMatches" function, the function that is supposed to prevent neighboring Blocks from being the same color. Immediately after updating though, the function just stopped working even though it still seems like it's running. I posted in the general forum about it and people suggested that it might be an issue caused by the recent bug fix applied to Or blocks. I don't know if that's what it is(partially because I don't quite understand what that bug fix meant, even after reading it), but it was suggested I post here if that was a possibility, so here I am.

  • Good idea, thanks.

  • I looked them over but the only one which seems to apply is the bug fix to Or blocks and I'm not really sure what it means by it "didn't always pick instances correctly". Does this mean it didn't always choose the right condition within the Or block, or is it something else? Other than that the update seems to have no impact on what I'm doing. If I'm wrong though please say something.

  • Hey guys and gals, I am the guy who wrote this series of tutorials on creating a Match 3 puzzle game in C2. I recently updated my version of C2 to R143 so that I could export a new version of the game for the Scirra Arcade, and for some reason some of the code stopped working. The last build I released was in R139 and it worked fine. The issue I'm having deals with the "RemoveSpawnedMatches" function I created. The goal of this function is to make it so that when new Blocks are spawned they don't spawn in a pattern that creates a match. The code gets triggered a few times during the course of the game and I never had any issues with it before, but now it just doesn't seem to work. I was hoping someone might be able to help shed some light on why the code no longer works and how I might be able to fix it. Even if you don't know why it stopped working, if you think of a solution, please let me know.

    Anyway, you can download my CapX here.

  • Okay so it seems I have been wrong about what exactly the problem was for a while. Originally I thought that the problem related to the RemoveSpawnedMatches function not firing within the function that creates the Blocks, when in-fact it is firing. The issue is that for some reason the function is never detecting the matches when it fires. Now this is very strange since I know the function works and detects matches perfectly, and have tested it in other scenarios within this same game.

    I think the problem has something to do with the fact that the Blocks are being made while it's trying to check for matching neighbors to remove simultaneously and somehow that is preventing it from working. I'm not sure why this would be an issue since it is making the same way you would populate a 2d array and thus even if not every block is made yet it should be able to detct matches perfectly with any existing blocks, but it is an issue nonetheless.

    nimos100, I attempted to implement both of the solutions you've suggested but they both seemed to fail for the same reason that mine does. I even went as far as putting all of the stuff in the RemoveSpawnedMatches function directly into the function which makes the Blocks(on a side note I'm not sure why I didn't do this to begin with) and I still ran into the issue I mentioned above where it gets into the initial part of the function where it knows it should perform the check, but never finds any matching neighbors it needs to modify.

    You can download the version which has it setup the way I just mentioned at the link below. You'll notice it also has some disabled code which can act as a workaround to the issue. For now I am just using the workaround until I can find a better solution, but if anyone can figure out why it's not working without the workaround I'd be incredibly grateful.

    docs.google.com/file/d/0B_goJNiY1s1SM1FEdEhZdnFhVjg/edit

    Also, nimos100 did you mean that I am using a plugin which prevents you from running it, or that you are using a plugin which prevents you from running it? I only ask because as far as I know I have no plugins in my C2 and it would be a potential issue if I did.

    Thanks again for any help that anyone can provide.

  • At this point it will probably help if I just post the capx file so people can look at my code and see if they can determine the issue.

    docs.google.com/file/d/0B_goJNiY1s1STjBoa0RrS2hMN28/edit

    The function where I am having the issue is the "CreateStartingBlocks" function. In this function I am creating a grid of Blocks and after I create each Block I assign it a BlockID. I then attempt to call the "RemoveSpawnedMatches" function with the number I assigned as the BlockID as the parameter for the function.

    This function is supposed to take in a BlockID, check if there is currently a Block with that BlockID, and if there is it is supposed to ensure that the Block is not neighboring any Block which is the same color as it is.

    I know that RemoveSpawnedMatches works because earlier I tried making a separate Event which goes through each Block one by one and sends them into the RemoveSpawnedMatches function and it worked perfectly. Right now I am trying to determine why it won't work in this specific scenario. Any help would be greatly appreciated.Here is the download link

  • I actually am using parameters in mine. I create the object, then I pass the object into the function. I have tried this with both the UID as the parameter and by creating an instance variable within the Block that I had complete control over and using that as the parameter and neither works.

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • So basically, until I have officially launched a new event, the objects are not available? This makes sense I guess, but it still doesn't explain why I can manipulate the objects in some ways the moment after I create them, and not in other ways within functions which are called after the objects are created. Also, I had previously attempted to put the creation of the objects into one Function and the manipulation into another and then call each function separately within the same function. Shouldn't this solve the problem? In theory once the function which creates the objects has run its course they should then be available to any action, whether it is called by the same event or not. Isn't this correct, or is there still something I am not understanding?

  • Okay so I am reviving this question because I would like more clarity on what ramones said. What is the relevance of me creating the Blocks in the same Event as the one in which I call the Function? I have been working on a better version of the game I was originally working on which handles much of the code more efficiently and I find that since I don't really understand what the problem was to begin with, I can't actually create a better solution for it. I know that the issue can't be as simple as not being able to edit an object in the same event you create it since I do that all the time. If anyone could explain to me why ramones made his original comment, it would be a huge help. If you still need the code I can attach it, but I don't see a reason to since ramones' comment was made without knowledge of how the code was structured before, and I am really just looking for clarification on that. Also, how would I tag ramones so that he himself could see this post and hopefully chime in?

    Thanks for any help you can provide.

  • Okay, I finally got it working. Ramones was correct, it was having an issue because I was trying to call the function which caused the for loop in the same event which created the blocks. I had to use a somewhat stupid workaround to fix it, but now that I understand the reason for the issue and got it fixed, I should be able to spend some time thinking of a more elegant solution. Thanks for the help.

  • Hey everyone, so I am having an issue I was hoping some of you may be able to help explain to me. I created a function in my project. Inside the function, there is a For Each Object Loop which goes through every instance of the object type I'm looking at and runs some code. The problem I am having is that when I run the game the For Loop only fires 1 time if it is part of the Function call. If I take the For Loop out of the function call entirely and make it a separate event it works perfectly and does exactly what I need it to do other than the fact it is running at all times and not just when I use the function. However, once I re-insert the function into the For Each Loop the problem reappears. Does anyone know why this might be happening? For reference I have included some screenshots of the function so you can get a better idea of what I'm saying.

    <img src="http://i.imgur.com/naL2sXx.png" border="0" />

    <img src="http://i.imgur.com/DitGAFU.png" border="0" />

    <img src="http://i.imgur.com/n6w7A7S.png" border="0" />

    Any help on this would be really appreciated as I think I had this issue with other functions in previous projects and Ive never been able to make it work. Is there something about the way a For Each Loop works inside of a function that I need to be aware of, or is it something else entirely?

    Anyway, thanks for any help you canprovide.