99Instances2Go's Recent Forum Activity

  • 3dski

    I was reading your first post. I noticed things like :

    "having to repeat the same initial object selection for every single item"

    "spawned copy at the target"

    "spawned copy at the target"

    So, i made this, up to you if you read it.

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

  • Make 2 events from event 7. One for 'on start layout', one 'for every tick'.

    Move the 'on start layout' way up.

    Now just make a new event containing a system > For each (Ball) condition.

    Drag all events (except the 'on start layout) as a sub under that new 'For each' event.

  • Plz, set a default protocol handler (if possible) for .c3p.

    Ty

  • Dont understand situation.

    I suppose 'velocity' is the amount pixels/tick that you move the sprite.

    'velocity' can be positive or negative (event 3 & 4).

    There is no Y position changed, so i suppose the sprite move only horizontal.

    The sprite can approach the tile from the left and from the right. (neg and pos velocity)

    We look in the future (x+velocity) and when sprite overlaps a tile, it gets positioned just outside the tile.

    Then its velocity is mirrored. So far the basics. As far as i understand them.

    When the sprite is approaching from the right (negative velocity) it gets positioned outside the tile on the right side of the tile.

    But. When the sprite is approaching from the left, it gets ALSO positioned outside the tile on the right side of the tile (tile index * 32 PLUS 16). Now it is flying trough the tile. The positive velocity is set to negative, as a result it returns (starts moving to the left) inside the tile (AGAIN) the next tick. And is indeed locked up.

    I think it should be (again if i understand it right, i dont see the layout, so sorry if i am again wrong)

    For each Sprite

    ______________ Set sprite to the future

    ___ Sub event :The tile check condition

    ____________Sub event : velocity > 0 <--- means it is approaching coming from the left.

    ___________________action: set outside tile .. = (tile index * 32) - 16 <------ on the left side

    ___________________action: make velocity positive

    ____________Sub: Else <--- means it is approaching coming from the right.

    ___________________action: set outside tile .. = (tile index * 32) + 16 <------ on the right side

    ___________________action: make velocity negative

  • I guess i could be possible to ....

    ...1/ ... save a Family as a Family Template (without the objects).

    ...2/ ... make it possible to copy/past Family's as a Template (so, without the objects) between layouts/projects.

    This way you could store anything and everything that is attached to a Family (instance variables, effects, behaviours) .... And recall it later in any project/layout .. even share it with any and everyone.

    All you have to do then, to have a sorta kinda reusable behaviour bank, is add the objects.

    I know a empty family needs to be addressed then.

  • If the condition in event 2 is true for the first sprite, then it has to be untrue before it can run again due the 'trigger once while true'. As a consequence, when the condition is true for the second sprite(after it was true for the first one) it will not run.

    Why is the 'trigger once while true' needed ?

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • No trouble, just happy someone shared a .capx.

  • CTRL + F

    (one of those shortcuts that are hardwired in my fingers)

  • Well you have references to two objects in there. It reads as "set the instance variable for object 'enemigo' to the expression enemigo.something. _________________________________________________^ first object_________________ ^ second object The replace is (always) asking for a replacement for both.

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

    Fixed 4 things for you.

    1/ This one is just for the logic. In your case not an important one. But, when using Ajax, you should wait until all Ajax stuff is done before continuing the events. Fixed this with setting group "QUIZ".

    2/ Changed starting Qnum to - 1. Now it starts to display Qnum from zero, the array is zero based. That, or you got to rethink the moment that there is 1 added to Qnum.

    3/ Now the first question is displayed immediately (no click required) . And all texts stay invisible until Ajax is done loading for BOTH lists. It was not necessary so that first by Ajax loaded list also was the first list to be ready and usable. But loads happened at kinda the same time, and it is not really known which one is ready to use as last, and could call the display function.

    4/ The logic flaw you had. Actual your question.

    When you clicked the text field. It called the function, that function changed the rAssign value. So the next (supposed to be the opposite checking) condition got a different rAssign feeded (then the first condition).

    Solved it with a plain 'else'.

    I left the browser object in there. To show you how you can use it so eassssy to debug. You can delete it.

    Hope this helps you and learns you something.

  • Plz keep those, it is already hard enough to remember if a value is in pixels/second or pixels/tick. Units are essential.

  • The loop will finish 'in place'. In the same tick, prolonging the tick if needed.

    Hence, it is (just) ready in the next event.

    Loop event

    _____bunch of actions

    Next event .... loop is ready

99Instances2Go's avatar

99Instances2Go

Member since 12 Feb, 2016

Twitter
99Instances2Go has 2 followers

Trophy Case

  • 8-Year Club
  • Email Verified

Progress

9/44
How to earn trophies