99Instances2Go's Forum Posts

  • I should daily file a bug report, claiming that 'wait' is a bug, adding every project where i see improper use of 'wait'.

    Plz. I beg you (again). Do not use 'wait' (unless the logic flow does not depend on the delayed actions). Especially, do not use wait in loops.

    Loops are meant/designed to happen inside 1 tick. Using 'wait' to force a loop to happen in the time of several ticks will bring you into problems. If you want something to happen over the time of many ticks, use the big system loop.

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

  • Rename the audiofiles to "No1" ... "No2" ... etc

    Play by name is then .... name = "No"&str(variable)

    Use the tags .. set it to str(variable) or so

    If you dont want to use Play (by name)

    Then you need as many 'play' events as there are values in the sequence.

    If variable = n

    ______ play the file "xx"

    If variable = m

    ______ play the file "zz"

    .......

    If variable = z

    ______ play the file "aa"

    That is not dynamical. And a lot of work. Dont understand why you dont want to use Play (by name)

    What i miss (this time) ?

  • The 'Add object to target' action is not 'personal'. It does not add 'picked' targets. It adds objects and their instances to its 'auto' target system. All instances of that object. Also, once added, the instance is not a target yet. It becomes a target when it comes into range.

    You can override the 'auto target' system by using the action 'Acquire target'. This makes a picked instance into a target (when it is in range at the moment the action is called).

    The 'Add object to target' action is typical used once and under a 'on startup' event.

    If you divide them in teams by instance variables, the best is to act on the moment that an instance becomes a target. (i think).

    Condition > On target acquired

    ___ Sub Condition > target does belong to team ?

    ______action > Unacquire target

  • Global variables ?

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

    You should not do that btw. Rather store the variables in array only, to start with.

    An array is no more then a global variable holding a list of values.

  • What kind of variables ?

    Instance Variables ?

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

  • Oh i misunderstood. Not randomly.

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

    To play use ... Audio > action > Play (by name) .....

  • There is an awesome plugin for that.

    plugin-smart-random_t163624

    But. Without a plugin, it can be done easly with an array.

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

  • Your cone was 360 degrees. There is/was no hint for another cone. You can easily change the loop to your liking for a cone to your liking.

    The collision polygons for your blocks have gaps. Can not read your mind that you dont like your own collision polygons.

    Of course the player goes transparent when it is set to transparent (traces of debugging).

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • Event 49 does not pick a BolaFogo.

    And, animation frame 7 will be displayed a few ticks in a row. Unless the animation speed = FPS, which is highly unlikely.

    Give that dragon an instance variable 'target' (number). Set its value in the property s to -9.

    In event 47 ....

    Set the instance variable 'target' to the expression HumDragao.Turret.TargetUID

    In event 47

    Set the instance variable 'target' to - 9

    In event 49

    If you have 1 dragon, no dragon picking is need, else you got to pick the dragon.

    But you have to pick the right target... so add the condition ....

    BolaFogo > Pick by unique ID > .... ID = HumDragao.target

    Add also a system > Trigger once while true ... else it will shoot out to many bullets. Because frame 7 is displayed more then 1 tick in a row.

  • Can i add that there is an awesome plugin for that ?

  • In base you have 3 'things' to deal with.

    1/ The behaviors are developed in times that devices could not run html 5 at a decent performance. And we are still locked up in that paradigm. I feel like it is time to move on, but i dont know that. As a result, .... all behaviors are optimized in an awesome way (i can only give compliments about that) ... but also to a point that any change will break compatibility with older versions of construct 2. That is why most behaviors are pretty basic.

    Escape is possible, but you have to re-code it all yourself and accept a drop in performance in a lot of cases.

    There are 3th party behaviors that are made outside of that paradigm. Like the one that i am using in my example.

    plugin-jcw-trace-raycast_t172320

    2/ The LOS behavior only checks if the origins are visible. This for obvious performance reasons. I wish Ashley would make that paradigm shift, but i guess either Ashley or our devices are not ready for that. So, even if you would manage to get it working with LOS, it will not solve your problem.

    3/ Since the LOS behavior only checks for the visibility of the origins, but the obstacles act as volumes, adding an instance as obstacle .... will obscure its origin from the LOS. So, there is no solution for an instance to be an obstacle (an obstacle = its collision polygon shape) and at the same time to be a target (origin is inside the polygon shape).

    x/

    Taking in account all the above, i made you a working example using a 3th party plugin.

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

    Have fun.

  • That 'trailer' is pretty good. I happen to very like it.

  • If you are not interested in the variable being possible zero ...

    System > condition > Is number NAN > ..... sqrt(variable)

    ________________action ... here the action that goes with a negative var

    Else

    ________________action ... here the action that goes with a pos var

    Or ...

    System > condition > Is number NAN > ..... sqrt(variable)

    ________________action(s) ... here the action that goes with a negative var

    Else

    System > compare 2 values > var = 0 ?

    ________________action(s) ... here the action that goes with a var = 0

    Else

    ________________action(s) ... here the action that goes with a pos var

  • Afraid it is the other way around. Adapt your game to the concept.

    Your concept relays heavy on 'creating' new blocks.

    As a result your logic will suffer from a known 'can't pick newly created objects ... how come ?' flawed flow.

    The forum has this extensively covered.

    https://www.google.be/search?q=scirra+n ... scirra.com

    You have 2 options: Get familiar with it (heavy 4 new users) or avoid it (as is showed you).

  • The actions you mean ?

    I suppose you have an additional condition.

    Just destroy the chains as in

    event 18 (on a new tap)

    and set the anchor off screen as in

    event 18 (new tap)

    event 22 (when the chain would go trough the player)

    event 23 (when the chain would be to long)