99Instances2Go's Forum Posts

  • Cant use containers, because killing the star would kill the disk.

    Give the star an instance variable 'parent'.

    When you create the disk and the star ... set star.parent to disk.UID

    Give the star an instance boolean 'selected'

    Now

    In the event where you pick the disk that is overlapping the ball and refine that to the top most disk ...

    Add a 'every tick'

    with the action ... star > set boolean 'selected' to false

    add the following condition ..

    star > pick by UID .. UID = disk.UID

    and the action ... star > set booelan 'selected' to true

    Now you can pick the right ball anywhere in your events with ...

    star is overlapping ball

    star has boolean 'selected' set

    Question ... why is this not working ?

    star is overlapping ball

    star is top most

  • In general.

    This is absolutely weird coding. Adding something to the array should be done once, and on the moment you add something to a cell. The same goes for removing. Now you add something to the array each tick. Because 'is overlapping condition' is true every tick that there is something on that cell. On the other hand 'is not overlapping' is true every tick that there is not something above the cell.

    This kind of stuff, checking overlaps every tick, will slowwww dowwnnnnn your game to the extreme.

    There should be no new code block for each cell. This is easily done with 1 code block for all cells, because they are instances comparing to 1 family.

    Specific.

    Event 4.

    Items is overlapping casilla. This is a pick condition. A pick condition makes a list of all instances/objects that meet the condition. Lets call this list the picklist. Now, 'Items is overlapping casilla' picks all items, every single member of the family items that overlaps with any casilla. At this moment the picklist contains all items and all casilla.

    'celda = 1" keeps from that picklist those cassila with celda = 1. Now the picklist contains ALL items and ONE casilla. The actions will run on this picklist.

    So if you use items.tipo in an action, which items will it use ? You did not specify an items. You feed all items to that action and expect C2 to gamble wich items it should use for items.tipo.

    Sorry if i sound harsh. I already apologise.

    But you should follow a few more tutorials about using 'instances' and 'familys'.

  • Someone did it in c2 allready

    http://bricklayer-stuffing-23733.bitballoon.com/

  • Why would something that works for 4 instances not work for 5 or 6000 instances ?

  • Restricting the movements based on animation frame is not that hard. Just intense.

    Here is a modest start.

    https://www.dropbox.com/s/go3mrysczgyp3 ... .capx?dl=0

    But i have no idea how you gonna construct levels.

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • Install the last version, in fact, even better: Use the 'repo installer/updater' for all rexrainbow's plugins.

    http://c2rexplugins.weebly.com/

  • https://www.dropbox.com/s/7b0cj47x15h2g ... .capx?dl=0

    But, if you going to compare/evaluate that much with lists, it might be better to keep the base data in 1 array and use the lists only to display/select. In othere words, as the UI element they are meant to be.

  • Part of the problem is well described in above posts. I have seen many proposed solutions, and none satisfies me (at this point).

    I would like to add another part to that description of the problem.

    Most behaviors are fps corrected. Meaning: their units are given in unit/second. The bullet speed is given in pixels/second. Meaning distance traveled / tick depends on the fps. To accurately detect a collision, at high speeds, at the inevitable sampling frequention 60/dt, it is needed to calculate from units in pixels/second to units in pixels/tick. And back. This, i found in the past, is very tricky. (well for me it is, i am no math wonder at all)

    Conclusion (in my opinion) it is to difficult to use fps corrected behaviors, when dealing with high speeds. It is quite impossible to get them sync with the sample rate that goes with a fps. Rather build an own system based on units/tick.

    This is an example.

    https://drive.google.com/open?id=0B1SSu ... W5OcTRxV2M

    Now, the max possible speed is now distance to travel * fps.

    In this capx that comes to Speeds like 60.000 pixels/second, that is close to 1000 pixels / tick at 60 fps, theoretical, in practice probably 50.000 pixels/second.

  • If the destination is inside an object that is solid, path will go the nearest available place on the obstacle grid outside that object.

  • Ah, but that is why i used 'cube' in stead of 'lerp'. Cube is just a lerp with 4 points. The easy way to make a easyIn/easyOut lerp without plugins, when dealing with a static end and a static start.

    Personal, for myself, i would use TweenLite, either to feed a lerpfactor to a lerp, or to use it as intended.

  • x is a increasing/decreasing number from 0 to 1 (or 1 to zero)

    you have to increase/decrease x in some system

    look at my example for 1 possibility

  • Well, how exacter the question how less general the answer eh.

    & yw.

  • When i use a lerp, i usually do it with a timer combined with a boolean.

    This way i can restrain the lerp and i know when it ended. By instance.

    https://www.dropbox.com/s/sa8g4v7lkj08s ... .capx?dl=0

    Cube is a lerp with 4 points. Nothing new.