99Instances2Go's Forum Posts

  • Basically, what you want is the Template 'Autorunner' twice.

  • First read this, plz.

    http://www.explainthatstuff.com/center-of-gravity.html

    To balance/unbalance, an object needs to able to rotate/have a torque.

    Platform behavior has no rotate mechanics, hence it is not suitable.

    You can do this with Physics, although i dont know how at this moment.

    You can also code the whole mechanic yourself, kinda simulating it.

  • If it was only the 'mkArray' plugin. No prop. But you are using more plugins.

    Anyway.

    Do not Use UID.

    Use instance variables or containers to pick pairs of object.

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

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

    And if i may advise this. Use only UID to pick, when you retrieved that UID like 'a split moment' ago.

  • If not to many numbers.....

    Give an object an instance variable 'RndNr'.

    Create instances during runtime (startup) and store values in 'RndNr' ...

    Or ... create them in the layout editor and assign the values there to 'RndNr' ...

    ..... As you wish.

    Mark them as picked with a boolean or destroy them. Say the boolean is named 'Used'.

    Then.

    Or :

    System > Pick random instance (Object)

    _____________action ... then number is in Object.RndNr

    _____________destroy object

    Or:

    Is boolean (Object) instance variable set ('Used')

    System > Pick random instance (Object)

    _____________action ... then number is in Object.RndNr

    _____________Set boolean 'Used' to true

    Or: If you want to reset the cycle, using that boolean

    Is boolean (Object) instance variable set ('Used')

    _______Sub System > Pick random instance (Object)

    _____________action ... then number is in Object.RndNr

    _____________Set boolean 'Used' to true

    Else

    ______Sub Pick all (Object)

    ____________action Set boolean 'Used' to FALSE

    _________Sub System > Pick random instance (Object) <---- sub under the 'pick all' to start from that picklist

    _______________action ... then number is in Object.RndNr

    _______________Set boolean 'Used' to true

    But, personal, i use and love the array way of doing this.

    Or the perfect blackhornet plugin

  • rexrainbow Has a Spline approach.

  • Sorry to drop my big mean ass in here .... but ... i see this ...

    Every 1*dt seconds vs. Every 1 seconds.

    From the manual :

    Common mistakes

    Never use dt in the Every X seconds condition! An event like Every 1 second will run every 1 second regardless of the framerate, thus is already framerate independent. The condition measures time, not frames. If you make an event like Every 60 * dt seconds, you have inadvertently made the condition framerate dependent - the opposite of what you want to achieve! Such a condition will run every 6 seconds at 10 FPS (when dt = 0.1), or every 0.6 seconds at 100 FPS (when dt = 0.01); if you just use Every 6 seconds, it already runs every 6 seconds regardless of the framerate.

    https://www.scirra.com/tutorials/67/del ... dependence

    You have 3 options (to my little knowledge) to have an more accurate time measuring.

    1/ The preferred one. Don not allow the game to drop under the minimum framerate.

    The default minimum framerate = 30 FPS, or (written another way) a dt = 1/30. Minimum means in this case that once dt reached 1/30, it will not grow any more bigger when the FPS drops even more. This means that once below the minimum framerate, all dt depending stuff (including Every X seconds) will calculate to a (longer) non realistic time.

    So, optimise the game, dont let it drop below the minimum framerate, not only 'Every X seconds' will be off, every dt using behavior will be off. Collision detection will fail. Platform jumps will jump higher. Timers are off. And more and more ....

    2/ Lower the minimum framerate with the action > System > Set minimum framerate. But, if you go extreme with this, having a game that drops in FPS and recovers the next tick, the difference between dt from tick to tick can be really big. Things can and will behave erratic.

    3/ Make you own timers using the System Expression 'wallclocktime' (if you have no problems with everything else behaving badly because FPS dropped below the minimum framerate)

  • Detecting 'enter' when using a TextBox :

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

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • random(1) generates a number between 0 and 0.9999999999999999999

    random(5) generates a number between 0 and 4.9999999999999999999

    It needs 2 randoms, else the distribution will be more dense around the centre. (barycentre)

    Explanation:

    https://adamswaab.wordpress.com/2009/12 ... ordinates/

  • Break up the shape in triangles, using imagepoints.

    First choose a random triangle.

    Then choose a random point like this.

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

  • If the speed of the animation = 20 frames / second. & Assume the game runs at 60 Frames / second.

    Then each animation frame is played 3 ticks in a row, hence the condition is 3 ticks true, that is why it spawns 3 objects.

    You solved that with 'On Frame Changed'.

  • You do not have permission to view this post

  • ?

  • This should work:

    Bring B into a family.

    Pre-pick A as you like

    Family is overlapping A

    (For each A / if needed)

    Let me know if it dont work.

  • Right mouse button down ?

    Sprite > instance Munition > 12 ?

    _______________ Sprite > Set boolean true

    In the Animations Group

    Sprite > Is boolean instance variable set ?

    _______________ Sprite > set animation

    In some other group

    Sprite > Is boolean instance variable set ?

    _______________ Sprite > do something else

    _______________ UNREFERENCED object > do something

    That sort kinda of situation?

    Dont understand why you would use the expression. The condition is perfect fine ?

    And blazing fast, if not true ... it just skips all the subs and actions.

    There is no way that you can do it faster than this.

    Unless i dont know where you are going with this.

    You (i think) forget two important things.

    1/ That boolean needs to be set false again. Setting that boolean false is not always easy. In this case it is easy.

    On Right mouse released

    _______________ Sprite > Set boolean true

    This is a new event. As you notice.

    2/ You see (i think) that boolean just as something that true/untrue. But it is way more then that.

    Never forget the 'Sprite' that i wrote several times up there.

    The condition 'Sprite > Is boolean instance variable set' PICKS all instances for that Sprite with that boolean = true. Its action work on all picked sprites.

    As long as that picklist is not empty, actions addressing unreferenced objects will work on all instances of that unreferenced object.

    So, if you set a boolean, and use that later to set animations (by instance), the condition also picks the right objects to set the animation to.

    That might sound weird because you talk about an object with only 1 instance. Yet, also that 1 instance needs to be picked. And you better pick it intentional, rather than par hazard.

  • ... i don't want to have to keep evaluating the Boolean value each tick

    Yet, that is the way to go.

    Unless you eliminate the use of the Boolean and move the actions that belong to its evaluating condition to the trigger.

    Assuming, that i understand you correct. This not what you wanna do ...

    On collision < a trigger

    .............. set Boolean

    On Boolean

    .............. do stuff

    Then just do this ...

    On collision

    ............ do stuff