sam3d's Forum Posts

  • 11 posts
  • First work with Construct 2 - game concept

    40 events

    Programmer art

  • Per this closed bug thread:

    scirra.com/forum/r802-r80-particles-spawn-bug_topic49783.html

    I can confirm that this bug exists.

    Using r99 - free edition.

    No plugins or extra behaviors.

    Switching to Enable WebGL = On removes the problem.

    Switching to Enable WebGL = Off shows the problem.

    [ I tried to link to a capx zip on another server - and got the spam detection warning. ]

    You can duplicate this problem by taking the

    Particle explosions.capx in your Examples folder and

    setting Enable WebGL = Off

    and the event sheet to

    System -> Every 1.0 seconds

    -- System -> Create object Particles on layer 0 at (random(400),random(400))

  • Thanks Ashley.

  • I several Items on the stage.

    If I say, on event sheet, ...

    Item -> some condition -> some action

    ...it works as expected for all the Items.

    If I say...

    System -> For Each Item -> (subevent) Item -> some condition -> some action

    ...it also works as expected for all the Items.

    So in the first example, is it looping through an index of all Items on the stage? iow. an implied for each loop?

    Is there any advantage ( performance, etc ) to explicitly using a For Each loop ?

  • Got it - and thanks for the details

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • shinkan

    Yes, I tried that and I get this message

    "Unknown expression 'damage'. This is not a system expression or variable name in this scope

  • I have several sprites on stage.

    They have an instance variable 'damage' set to 0

    They have several animation frames and Speed = 0 and Loop = No

    I loop thru the sprites using 'For each'.

    I set the damage variable to 'Add 1 to damage'

    I would like to set the animation frame to match the damage variable.

    So each time the damage variable increases, move the sprite animation to the next frame.

    [when it reaches the end of the animation frames, I'll destroy that sprite]

  • chasethomas - don't be reluctant, get the beta release, it's fine.

    And worth it to see recent capx - especially for learning.

    Expecting members to downgrade so they can resave is a bit much.

  • Nimtrix - yes, the For Each loop is what I wanted (duh).

    Telles0808 - you prefer a mask because it allows for fewer calculations via collide as opposed to relative distance ?

    I need the latter as I don't want to rely on collision, but was wondering.

    I have an example working using keepee's suggestion...

    Thx for the replies - very helpful in getting oriented.

  • keepee - yes, I know how to use distance. I was asking about how to use it and arrays within the context of the Event Sheet. But thanks.

    I found this, which I don't quite understand yet re Event Sheet, but it is a good starting point:

    scirra.com/forum/physics-explosion-with-impact_topic45047.html

  • Hi,

    Been playing around with Construct 2 for a couple of days now - very impressive.

    I'd like any suggestions / links on how to do this:

    2 Objects with Physics: Bomb, Crate->Bounding Box

    In the scene there is 1 Bomb and several Crates.

    I can click the Bomb and apply an impulse.

    But it seems to apply the impulse equally to all instances of Crate, regardless of their position.

    I'd like to check the position of each Crate instance relative to the Bomb and then decide whether to apply an impulse to that Crate instance.

    Pretty straightforward to do in JS or AS3:

    Loop thru an array of Crate instances, get the current X,Y of each instance, compare it to Bomb X,Y, and make a decision.

    How would you accomplish this within the Event Sheet?

    Or is there a way to inject and call a custom function ?

    Thx.

  • 11 posts