Ashley's Recent Forum Activity

  • Can you throw together a quick example .cap? For Each triggers all the conditions below it, and actions and subevents, once per instance. It's a bit like saying "For i = 1 to Object.Count" and for each iteration, it picks a specific instance. Essentially, it is used to force system actions and conditions to work on a per-instance basis.

    For example:

    + On any key pressed

    + Sprite X < 320

    Create object 'ring' and position by Sprite

    In this case, when the event triggers, if a Sprite is left of X=320, only one 'ring' is created. The action is a system action, so simply executes one time. The ring is positioned by the first picked Sprite.

    Using For Each:

    + On any key pressed

    + Sprite X < 320

    + For Each Sprite

    Create object 'ring' and position by Sprite

    This forces the actions to be run once per instance, so a 'ring' object is created for every 'sprite' left of 320.

    Another use:

    + Compare values: distance(A.x, A.y, B.x, B.y) less than 100

    Destroy A

    In this case, because Compare Values is a system expression, it simply runs once, retrieving the values for the first A and B instances, calculating a single distance, and making a single comparison. This isn't useful if you have multiple A and B objects - unless you force the condition to check once for every combination of A and B:

    + For each A

    + For each B

    + Compare values: distance(A.x, A.y, B.x, B.y) less than 100

    Destroy A

    This destroys any A if it comes within 100 pixels of any B object, instead of only applying to the first instances.

  • 'Every' events trigger without regard for specific instances, since they're a system condition. You can keep individual timers by subtracting from the instance's 'countdown' variable, which will work instance-by-instance. Note TimeDelta is the time in seconds since the last tick (the last time the event was run).

  • Just a note about bug reports: please make sure every bug you find goes on the tracker (link above). Even if you post it to the forum and I say I'll take a look, it would be useful if you also submit a tracker item. Forum posts get drowned out by the general discussion, and the tracker is an organised place to deal with all reports. Cheers! <img src="{SMILIES_PATH}/icon_smile.gif" alt=":)" title="Smile" />

  • So you can go file - new template, and open and run the templates? Is it purely inserting objects that crashes?

    It would be useful to know your graphics hardware - if it's onboard, the GPU model or just motherboard model, too.

  • Microsoft do do some things excellently - in my opinion visual studio 2008 is the best code editing IDE out there, and I use it for Construct. Also, while it's no more likely than a Flash runtime, a Silverlight runtime for web games is something to think about and research (but I emphasise, no more likely than a Flash runtime, which is pretty darn unlikely).

  • Are you drunk?

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • Haha, I think I forgot to add that condition

    I'll put it in the next build. You can also make all the rest of the events in the group a subevent to a "group is activated" condition - when it's done - saving you repeating the condition in every event.

  • Well, the activation of a group currently acts like a big 'if' statement. The activation state of the group is only checked at the top of the group, and if it is activated, all its events get run. Consider the event:

    + Global variable 'Myvar' = 0

    Action 1

    Set 'Myvar' to 1

    Action 2

    Even though the action 'Set 'Myvar' to 1' makes the condition of the event false, this does not cancel the running of the event; Action 2 is still run even though the event is no longer true. It's simply because the conditions are checked once only, and all actions are run when that check is true.

    The logic is the same with groups, and I'm not convinced it should be changed, since this behavior exists in other places in Construct. You could work around it by adding 'Group is activated' conditions to the subsequent events after a deactivate.

  • Sorry to spoil the surprise, but it's a helicopter.

  • Very nice solution, textures pull this off nicely. Kudos for scaling smoothness too!

    Hint: Enable 'Force Own Texture' on the circle layer, and add the Erase effect to the green circle. You get just a nicely antialiased black ring which might be useful.

  • And congrats on being the first person I noticed to crop up on the birthday detector machine

  • Go File -> Save As, and at the bottom, there's a button that says 'Change' next to the Format. Click it and select 'PCM' as the format, and try to match the same bits per sample/frequency as the original file.

Ashley's avatar

Ashley

Early Adopter

Member since 21 May, 2007

Twitter
Ashley has 1,425,409 followers

Connect with Ashley

Trophy Case

  • Jupiter Mission Supports Gordon's mission to Jupiter
  • Forum Contributor Made 100 posts in the forums
  • Forum Patron Made 500 posts in the forums
  • Forum Hero Made 1,000 posts in the forums
  • Forum Wizard Made 5,000 posts in the forums
  • Forum Unicorn Made 10,000 posts in the forums
  • Forum Mega Brain Made 20,000 posts in the forums
  • x108
    Coach One of your tutorials has over 1,000 readers
  • x62
    Educator One of your tutorials has over 10,000 readers
  • x3
    Teacher One of your tutorials has over 100,000 readers
  • Sensei One of your tutorials has over 1,000,000 readers
  • Regular Visitor Visited Construct.net 7 days in a row
  • Steady Visitor Visited Construct.net 30 days in a row
  • RTFM Read the fabulous manual
  • x35
    Great Comment One of your comments gets 3 upvotes
  • Email Verified

Progress

32/44
How to earn trophies

Blogs