mekonbekon's Forum Posts

  • There should be a json file for the array in the Project>Files folder - if you download this and open it in a text editor you can check to see what data has been saved.

    If you can't see anything obvious wrong with it try sticking it into a json validator like this one: jsonformatter.curiousconcept.com

  • you're welcome :-)

  • If all of your soldiers use a weapon then I'd consider adding them in a container together, so when you pick a soldier its weapon is automatically picked.

    I'd also pin (position only) the weapon to the soldier so that you don't have to keep repositioning it.

    If you do use a container then rather than having a family it might be better to just have a single soldier object and set the team and class with a variable. You would have different animations for the teams and classes on the one soldier object. Same for the weapon: a variable for type, different animations for each type.

    On start set variables and animations for each soldier/weapon then pin the weapon to the soldier.

    Every tick for each soldier set weapon angle to Mouse X,Y.

    The pin should then take care of all the repositioning.

    On change of direction, unpin the weapon, mirror the soldier, mirror the weapon, reposition and repin.

  • If you want to return to layout X from layout Dungeon, on leaving layout X save the name of the layout to a global variable (e.g. "lastLayout").

    When you exit the Dungeon use the Go to Layout (by name) trigger, using the lastLayout variable.

  • No probs :-)

  • You will probably be able to cut down the number of conditions required with some careful grouping of objects into containers and families.

  • Here's one way, assuming you're picking the "n" nearest Object B to Object A and there are multiple instances of A and B:

    Give B the instance boolean "isPicked" and set to false as default.

    1. Pick instance of Object A (using whatever criteria you want)

    ---System: Repeat "n" times

    ----- Object B isPicked is false, Object B: pick nearest B to (A.X, A.Y): Set isPicked to true

    2. Object B: isPicked is true: do your thing.

  • Had another thought about this over night; instead of spawning loads of mask objects, you just use one that tracks the mouse and paste it to a drawing canvas object positioned over the dirty version of the pan - The canvas uses the destination out effect instead of the mask, and the mask is set to invisible.

    Here's an example:

    dropbox.com/scl/fi/i8ezy604zhnho8bg5w3kw/dishwasher01.c3p

  • No problem :-)

  • Here's one way of doing it:

    dropbox.com/scl/fi/g0ezglt8e60xjdxdq276u/dishwasher.c3p

    In this example I create a grid of dirt objects that cover the pan - these are invisible, but will be used to track how clean the pan is.

    There are two instances of the object, one with a dirty animation overlaying a another with a clean animation. As you move the mouse over the pan I repeat-spawn a mask object to hide the dirty version wherever it's spawned (using destination out effect), gradually revealing the clean one. Any dirt objects overlapping the mask object are destroyed - a tally is kept and when all have been destroyed the pan is 100% clean.

    Bubbles are created - I have these draining off but if you want them to remain you can disable their bullet behaviour.

    There's a more detailed explanation in the project comments.

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • I'm guessing it's because you haven't changed the txt_answers.no variable for the copy/pasted instances to 6-10.

  • You can use two "for" loops to draw the objects, one for the grid width, one for the grid height:

    dropbox.com/scl/fi/3fxco1fdvvbm8nwev1hak/objectGrid.c3p

    In this example you can change the grid using the gridWidth gridHeight and margin variables.

  • Is the new colour picker a permanent feature for comments? It's a pain to type in the RGB values every time you want to set comments to the same colour. A set palette is much quicker to use.

  • If you want the object to follow a curved path to a specific point rather than travel a fixed distance it can be tricky using bullet.

    This method will ensure the object passes through the mouse click:

    dropbox.com/scl/fi/gl09jh4trk25c5sdaaztv/parabola.capx

    In the demo "to point" will stop the object at the mouse click, whereas "continuous" will keep it going until it hits the ground.

    (credit to R0J0hound)

  • Frankly speaking, now that it has been mentioned, I wouldn't be averse to a little "there are 12 events using this object/variable" additional warning text there so that we can go wut? I thought this wasn't used just in case.

    It would be extra-handy if that pop-up also had a "find all references" button so you can immediately jump to the usages.