R0J0hound's Recent Forum Activity

  • Selecting a chain of objects is basically a flood fill.

    http://dl.dropbox.com/u/5426011/examples11/pick_chain.capx

  • You can take advantage of the fact that each object has a unique UID.

    +--------------------------------------------------------+
    |Player | On collision with BulletFamily                 |
    +--------------------------------------------------------+
    |  +-----------------------------------------------------+
    +--|SG_slug    | Pick instance with UID BulletFamily.UID | Player| destroy
    |  +-----------------------------------------------------+
    |  +-----------------------------------------------------+
    +--|AK47_round | Pick instance with UID BulletFamily.UID | Player| change animation to "painfull death"
    |  +-----------------------------------------------------+
    |  +-----------------------------------------------------+
    +--|bb         | Pick instance with UID BulletFamily.UID | Player| laugh
       +-----------------------------------------------------+
  • With the introduction of push and pop the array size can be reduced to 0, but the "set size" action won't let you make the array empty (or 0).

    For instance:

    Array| set size (0,1,1)

    will result in an array of size (1,1,1)

    It can be worked around by doing a pop on the x axis, but it would be nice to remove the restriction that the smallest set size is (1,1,1).

    -cheers

  • I'd say it's a bug, well, actually it's a carry over from before the array object had push/pop and any size lower than (1,1,1) had no purpose. I'll file a bug report.

    As a workaround you can make the size 0 by setting the size to 1,1,1 then using the pop action.

  • That's weird since it works for me with python 2.7.3. Anyway glad you got it working. Usually an error like that is due to some typo in my code which I can fix if I can reproduce it.

    Here is a mini example of a use of the script. It gets the names and icons of every object type in the cap.

    http://dl.dropbox.com/u/5426011/examples11/test.zip

  • I can't reproduce that error. Did you open the cap file in construct and re-save it? I designed the script to only work with cap files saved with construct 0.9996 or newer. I also have only tested the script with python 2.6 and 2.7.

  • ..Wouldn't you recommend he use an array anyway considering the type of game?

    You can use an array and it would likely be faster, but it uses more events. For me it was just a matter of preference.

    http://dl.dropbox.com/u/5426011/examples11/pickrow_array.capx

    would like to modify that example so it checks on all 8 directions, moving 32 pixels at a time like in the example, would that be possible?

    Like this?

    http://dl.dropbox.com/u/5426011/examples11/pick_all_directions.capx

  • You can do it without an array.

    http://dl.dropbox.com/u/5426011/examples11/pickrow.capx

    It looks at each sprite then move the detector left until it isn't overlapping a sprite. Then the detector is moved right and that run of sprites are picked.

    Columns of sprites can be picked in a similar manner.

  • re you sure it's not possible at all? Maybe it would just be very bothersome to do so.

    It's bothersome to do so. Images and Layouts are simple enough to extract but events are tricky since ACE names are not stored in the cap, only number indexes.

    I made a python module to read/edit cap files that may be useful:

    http://dl.dropbox.com/u/5426011/utility/capreader.py

    It more or less mirrors the cpp files for saving/loading cap files.

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • Try un-checking "global" for GraphPlayer and PhysPlayer. Also uncheck "global" from the objects on the "Solid" layer: SolidSolid and PlatSolid. If you find any other objects with global checked, uncheck them.

    With global checked the objects are not destroyed when the layout changes. You don't need it since you already put an instance of the object in each layout.

  • Here is an implementation for C2:

    http://www.scirra.com/forum/sorting-an-array_topic49771_post313341.html#313341

    Also if you get the latest beta R87 you can just use the sort action for the array object.

  • Just tweak that formula you used in GM. Instead of +90 use -90 or 270 which is up in Construct.

    (bat.X - ball.X -90)
R0J0hound's avatar

R0J0hound

Member since 15 Jun, 2009

Twitter
R0J0hound has 155 followers

Connect with R0J0hound