codah's Forum Posts

  • Maybe you could execute some JavaScript that does it.

  • chinmay I sent you a PM

  • Great effort!

  • I have ran into this as well - seems like the solution is to make your own loop - i.e. a variable you add to and then just do something like Variable < TargetSize do events, wait...

    Yea probably the best idea. I think Timer behaviour might work too.

    edit: added 1 line to the other capx. try this. ok 2 lines

  • heh.. like in the capx I did in your other topic

    yeah loops occur in 1 tick, so you can't wait in a loop so easily. Perhaps like suggested in that tutorial. Why doesn't it help?

    edit : I guess it's complicated by 2 loops and also dynamic creation of objects..

  • When exporting what is the app version code, minimum android version, domain access and target android version and what should they be?

    App version code is another way to express the App version; an arbitrary number that you should increase by 1 or more each time you want to publish.

    Minimum android version represents the minimum Android API level you want to support (normally leave it)

    http://developer.android.com/guide/topics/manifest/uses-sdk-element.html#ApiLevels

    I don't change Domain access but the tooltip in the XDK gives you some info (leave it)

    Target android version is the android version that you mainly support (normally leave it)

  • //===========================================

    SECOND QUESTION:

    When a bullet hits a Family of enemy sprites, how do I pick the individual sprite that got hit by the bullet? I want to save lines, time, and works instead of manually doing bullet1 colliding to enemy1 to enemy40+ and doing the same thing for bullet 2 to bullet 10+,( thats like 800+ similar lines alrdy). I don't mind the event sheet line limit for the free version, it's just this is inconvenient and impractical.

    Thanks in advance.

    I thought the free version doesn't have Families. Or is this for when you get your licence?

    Anyway if you have a Family of Sprites, and you have an 'on Family collision with Bullet' event, you will already have the Sprite (as a Family). So you could get Family.UID or whatever. If you really wanted to deal with the Sprite directly, you can 'pick Sprite with UID Family.UID' but if you do that a lot it that kind of defeats the purpose of Families.

  • Variables count, you must have 16 variables?

  • Since you can't have a XY array of irregular width.

    You said it. So at no point will you have a row smaller than another row. The best you could do is:

    1. Choose your random column (cell)

    2. Re-order that row so that cell's value is at the end of the row

    3. Repeat for each row

    4. Finally, set the array width to it's current width -1

    Now you have an array with width 1 less than before

    Repeat the above steps until you have no more columns (cells).

    Hopefully you will do something meaningful in between the above steps!

    So this is not possible, because it goes against your original assertion. (Although conceptually, it could be thought of this way).

    [quote:2rhmvvdk]Then a loop for every horizontal row, you pick one cell at random, and then delete it. Making the width of THAT row one cell smaller.

    Is this close to what you're asking?

    edit: added a capx, hope it helps (it's 10x10 but it's dynamically set, just change it).

    The array is represented on-screen. Tap on the layout to process each column and observe.

  • The expression 1 - Sprite1.AnimationFrame

    If the animation frame is currently 0, then 1 - 0 = 1 and so the frame will change to 1 (checked)

    If the animation frame is currently 1, then 1 - 1 = 0 and so the frame will change to 0 (unchecked)

    As you saw I made the 2 states as frames in the one sprite rather than 2 sprites, and turned animationspeed to 0 in properties, so they didn't animate between the frames when we didn't want them to.

    You can add an instance variable to track state (checked/unchecked) or just continue to use 'Sprite1.AnimationFrame'. If the latter, I suggest you create 2 constant global variables

    UNCHECKED = 0

    CHECKED = 1

    and use those instead of 0 and 1

  • Here's a start

  • Do you have the full licence? Sorry it's off topic. I guess you don't or you could use a Family and more than halve those events.

  • > How about have a dummy invisible object that you move to that location and see if there's an overlap? The above code won't work properly (although the idea is valid) because X and Y will rarely be an exact integer number, plus what if there are other object types that you want to check for?

    >

    System: pick overlapping point might do it too.

    Never used it Now I know

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • How about have a dummy invisible object that you move to that location and see if there's an overlap? The above code won't work properly (although the idea is valid) because X and Y will rarely be an exact integer number, plus what if there are other object types that you want to check for?

  • This is closer to what a container would do for you, because you just create one of the object instances and the others get created for you. You can't directly find out the types of object in a Family AFAIK. However there *are* ways of doing it indirectly. If you want to go 3rd party you could use the Nickname plugin.