Ashley's Recent Forum Activity

  • You do not have permission to view this post

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • What model phone did you try on and what version of Android? The phone might have an accelerometer but not expose it though the browser.

  • Can you post a .capx? Scroll To just scrolls to the object so are you sure your object is in the right place?

  • What exact warning did you get hungry4donuts?

    Also you can do all the multiple screen size support on the Construct 2 side, there's no need for PhoneGap to handle that. See Supporting multiple screen sizes.

  • You're right, the Object(index) syntax skips the picked objects and uses the full instance list. This was done because it turned out the feature wasn't actually useful if it stuck to the picked objects - there were lots of other cases it worked better using the full instance list. Basically it's best to stick to UIDs.

    I wonder if another feature would be more helpful here - perhaps Object[UID].Expression, like a UID version of the current expression indexing...

  • Well the main issue with different instances of an array is it can be confusing. For example, the way event picking works is if you pick more than one array instance it will be writing to two arrays at the same time. And this all happens "invisibly" - it's hard to check which arrays are being written to and what their content is.

    It's clearer to think about if you only have one instance of an array. If you need multiple 2D arrays, use one 3D array instead, or different array objects if possible. On the other hand, if you know what you're getting in to, I guess you can go ahead and use multiple array instances!

  • This doesn't work because subevents carry on picking where the parent left off.

    The event runs like this:

    1. First array instance created. The 'create' action picks it.

    2. Its UID is saved.

    3. Second array instance created. The 'create' action picks it. This is now the only picked array! The other array instance is no longer picked!

    4. Enter the subevent. The subevent inherits the parent event's picked objects, i.e. *only* the second created instance.

    5. Conditions only ever run on the picked instances. So "pick by UID..." in that subevent will only pick from the second created instance, which does not have the UID you want, so the event can never run!

    There's no bug here, it's just Construct 2 working normally.

    There are three possible solutions:

    1) Use system 'Pick all BaseArray' before the 'Pick by UID' to go back to both arrays picked rather than just the second array picked.

    2) Make a new start of layout event and move the pick by UID to there.

    3) Don't use multiple instances of array - it's much better to use two different array object types than two instances of the same array (i.e., insert a new array in to the layout again and use that).

  • Objects don't move smoothly, they actually move in little jumps every frame. Also, one object can be at X = 100, and another can be at X = 100.000000001, and those are not equal, so the chances the event is true is almost impossible.

    You probably want an event something like

    + Sprite2.X < Sprite1.X ("sprite2 is to left of sprite1")

    + Trigger once ("only do this once")

    -> Spawn sprite3

  • What is more cpu-intensive: 100 objects with 4 polygon points, or one object with 400 points?

    It's probably more CPU intensive to use one object with 400 points. It's best to use more objects with fewer collision points.

    If an object is overlapping an object with 400 collision points, it will probably check all 400 collision points in that object. If it is overlapping an object with 4 collision points, it will check just those 4 collision points (100 times less!) and it will skip checking any of the other objects.

    Of course using more objects has its own performance impact, but using lots of collision points isn't very efficient in the engine at the moment, so it's probably better to avoid that. This can probably be optimised in future, but this is how it is at the moment.

  • You can click the dropdown next to the undo button which lists everything that's in the undo queue. Does that help?

  • I can't think of any reason re-picking the same events would fix anything. When you click export, if it's the same events, you should get exactly the same output. Are you sure you did not change anything else?

    Also, if you can reproduce this in a new project could you post it to the bugs forum?

Ashley's avatar

Ashley

Early Adopter

Member since 21 May, 2007

Twitter
Ashley has 1,773,199 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
  • x126
    Coach One of your tutorials has over 1,000 readers
  • x74
    Educator One of your tutorials has over 10,000 readers
  • x5
    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
  • x42
    Great Comment One of your comments gets 3 upvotes
  • Email Verified

Progress

32/44
How to earn trophies

Blogs