jstar's Recent Forum Activity

  • my question was answered by codah

    Thanks to you both!!!

  • codah and

    ***EDIT*** I saw the capx you posted after I made this post and it makes sense now

    I had followed a bad example of how to properly use Dictionaries key/value pairs

  • codah I just tried that in the example I posted and it doesn't work. Can you try with my example capx and see?

  • I created a capx as an example of the question I have:

    [attachment=0:21gwrk6q][/attachment:21gwrk6q]

    I understand that you can get the key/value from a dictionary by using:

    Dictionary.Get("")

    I'm wondering if it is possible to get the key/value by using an instance variable value of an object. For example in the capx I posted I have a sprite that is named bunny. The bunny has 2 instance variables, one which is "type". Can you only use this method with a global/local variable or should you be able to use:

    Dictionary.Get("bunny.type")

    Using the instance variable does not work in my example but I have been able to get it to work with a global variable.

  • Koronello

    I haven't actually tried this since I have yet to make a retro pixel style game but try setting the pixel rounding under project settings to on. Something else to try is changing sampling to point rather than linear under configuration settings.

    From the manual:

    Pixel rounding

    By default Construct 2 objects can be drawn at sub-pixel positions, e.g. (100.3, 200.8). If the browser is using linear filtering, this can make fine pixel art appear blurry. If Pixel rounding is set to On, Construct 2 objects round their position to a whole number before drawing, e.g. (100, 201). This prevents any blurring, and can also prevent "seams" appearing on grids of objects. Note this does not affect their actual X and Y co-ordinates, which can still be between pixels - it only affects where they are drawn on the screen.

  • Castawayroth I'm not sure what you mean by the layouts view. Do you mean the projects bar usually organized on the right of the screen or a layout in your project?

    At the top of construct are 4 tabs: file, home, view, and events

    Click on view and make sure that the bar you need is checked. The projects view is the window with all your event sheets, layouts, objects, etc associated with an open project organized in folders. If you close a layout or an event sheet and need to reopen it, all you need to do is double click it in the projects bar to reopen.

  • Unnatural20 that is a great solution!!! It cascades beautifully and is exactly what I needed. I had tried something similar where I had 4 small sprites spawn out in a "+" pattern but it didn't work and they were individual and not connected. I don't know why I didn't think of making an actual + shaped sprite. I think your idea of making it trigger only once while true also makes a difference compared to what I had tried and I have some ideas to clean up the reasons why the player can sometimes end up picking more than one bug type as a match. THANK YOU!!!!

    I realized that the biggest challenge in the ways I had been trying to use arrays is that you can't easily get the x,y,z of a value in an array. You can kind of get it if you check the entire array and use loopindex but not check it starting from a specific x,y,z.

  • I have been stuck for awhile now and I'm hoping someone can give me some pointers. I'm working on a game that has a puzzle mechanic similar to a match 3 like candy crush or a bubble blaster game. The part that I am stuck on is recognizing the matches.

    I have one sprite in my capx which is called "bug", it is the game token or candy or bubble if that helps for context. In the attached capx example there are 3 bug types each with an idle, hit, panic, destroy, and fall animation all part of the single object. I used an instance variable to identify which bugs are which of the 3 types and it matches with the first part of each animation name. For example type = bee, so beeIdle, beeHit, etc for animation names.

    [attachment=0:129dsili][/attachment:129dsili]

    How the game should work:

    Player touches bug> bug animation changes

    Player can stay in touch and move from one bug to the next without taking finger off the game and choose a different bug

    All bugs that are the same type touching the currently touched bug (4 direction) also change animation and are matched so on touch release all those bugs and the one being touched would change to the destroy animation and then be destroyed

    There is no minimum match, so if the player is touching a bug and there are no touching matches then only that bug would be destroyed. If there was only one touching match then the 2 bugs would be destroyed. So it really isn't a match 3 but it is similar. There is no swapping of bugs or drawing a line to match bugs. Just touch bug and all matched bugs touching that bug will be destroyed on touch release.

    I've tried using an array and some recursive type solutions, and I looked at a few plugins and templates. I did not include any of my failed attempts at matching in the example capx since I'm embarrassed none of them seemed to work at all. I have searched the forum and read all that I could find on the subject. It does make me want to learn finite state machines more. Thanks in advance for any support.

  • HadesDC what alextro suggests will work as long as you keep that event outside the function "Icicle Drop" because you are using a keystroke as a trigger. Moving the shadows is ideal to destroying them. It is a bit slow the more objects you have on the screen.

    [attachment=1:9htxyqnv][/attachment:9htxyqnv]

    Here is another similar option where I have added some ideas on how to better control your icicles including putting the icicle/shadow in a container and the hit icicle/cracks in a container, breaking up the icicle drop function into multiple parts and using a global variable to determine the amount of icicles, not using the golem/sprite 2 to create the icicles/shadows, and I changed some of the triggers so that the icicle fall/ destroy was more organic and you don't see the slow spawn of the icicle shadows when avoiding overlap. You may have some challenges with icicles colliding with the wrong shadows and you may get better performance if you try the move to plugin rather than the bullet movement and use the move to rather than collision. But that is speculative, and you should use your best judgement based on your game design.

    [attachment=0:9htxyqnv][/attachment:9htxyqnv]

    You could also use a recursive function to create each shadow at a distance from the last created shadow (only slightly faster and the pattern would look Fibonacci and less awesome), use a randomized array that has dynamically generated on start of layout non-overlapping spawn points (faster but more complicated), or use set spawn points (fastest but least awesome visually).

    Good Luck! I bet your finished product will be very cool.

  • HadesDC Now that I see the capx I think I understand. I think I have some ideas to try.

    Just so I am clear:

    is Sprite 2 just the method you used to set the correct position of icicleshadow from icicle?

    does Golem have a function in your game or is it just used to set the initial position of icicle?

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • without seeing your capx...

    have you tried an event like:

    system> pick overlapping point > object: icicle, x: icicleshadow.x, y: icicleshadow.y

  • rexrainbow

    Your plugins are always awesome.

    I'm slowly learning about FSM and the bejeweled example is great. However I am stuck trying to figure out how to change the input from swapping to clearing the matches of a tile when the tile is clicked. I understand how to not clear matches automatically when they occur and how to change the match min and max limits. Can you give me some additional pointers?

    Or if anyone else can point me in the right direction, I'd appreciate it.

jstar's avatar

jstar

Early Adopter

Member since 25 Dec, 2014

None one is following jstar yet!

Trophy Case

  • 9-Year Club

Progress

9/44
How to earn trophies