R0J0hound's Forum Posts

  • You can copy the image of a Canvas to a Sprite with the ImageManipulator object. Specifically with the two actions "copy from sprite" and "copy to sprite". Even though it says sprite it will work for copying from a canvas.

  • I am curious why you are using the canvas plugin for the Lemmings example and not setting it up like a platformer? Is there any technical reason for this?

    It's a technical reason. Sprites use polygon collisions which are not changeable at runtime. Canvas' can set/get individual pixels so it can be used for per pixel collision and tunneling.

  • The resource filenames are not included when exporting.

    You can work around it with this plugin:

    http://www.scirra.com/forum/plugin-resource-access_topic39986.html

  • This breaks a common use for Else.

    Opps, I forgot to think of that. And now that you mention it that is the main reason I used "else" in CC.

    In that case I agree with you that option A is the best option. It will work with System conditions and single instance objects exactly as expected. Any complexity added when using multiple instances of an object can be solved in the same manner as conditions such as "Sprite| X=Sprite2.X" when multiple instances of each are invoved.

    edit

    Logic only would also be ok. Case 2 would then be soved with a "for each Sprite", which is pretty common solution used for a situation like that.

  • My thought is Else should just be shorthand for all the conditions of the previous event inverted.

    Case 1 and 2 would work as expected.

    Case 3 would read like this:

    +-----------------------+
    |System| variable1 = 0  | -Do this
    |Sprite| X<320          |
    +--+--------------------+
       |
    +-----------------------+
    |System| variable1 != 0 | -Do that
    |Sprite| X>=320         |
    +--+--------------------+
       |

    Which may or may not be what is desired. If it isn't then sub-events can be used like Ashley pointed out.

    This is how it seemed to work in CC with the exception that the inverted selection was a bit wonky which made "else" only useful for simple events.

    So, option A, but explain it's behavior as all the conditions of the previous event inverted.

    My 2c.

  • I missed the fact that this was in the Construct Classic section.

    In CC here is a way to slice up an image into separate pieces:

    http://dl.dropbox.com/u/5426011/examples10/sliceCanvas.cap

    It doesn't remove the issue of making it work with physics. Physics uses polygon collisions not pixel collisions, so the links I posted are still relevant.

    To use physics the approach I would take is use some python working with pyBox2d or pymunk.

  • It's partially doable, you can use the canvas plugin to draw the shapes but you wouldn't be able to use the physics behavior since you can't change the collision polygon a runtime.

    An approach for the splitting of a polygon by a line mechanic is explained here:

    http://stackoverflow.com/questions/3623703/how-can-i-split-a-polygon-by-a-line

    http://en.wikipedia.org/wiki/Line-line_intersection

  • till waiting for the auto updater.....any news guys?

    Why not just download and install from the first post on this topic?

  • You could try using a slightly older driver or tweaking the settings in Catalyst. I have a similar issue with vista and a radeon x1200 where at 1:1 scale the sprites appear at half resolution (pixely) and when I resized them smaller they fade to transparent. It was working correctly for me until I upgraded to the latest driver. It still occurred when I rolled-back the driver so it leads me to think it's some graphics quality setting.

    You may have more luck than I since your card is still supported by AMD.

  • Every time one of the keys of the code is pressed append it to a text variable.

    Do a system compare with right(length of code) equal to code to see if it's a match.

    So say the code is udlra.

    u for Up, d for Down, a for A, etc.

    You events (-input events) would look like this:

    Global text variable 'value'=""

    System| compare right(value, 5) = "udlra"

    ---- Enable Cheat

  • If you use this pattern: |index,value

    pets="|1,dog|2,cat|3,fish"

    To get the value at slot:

    tokenat(tokenat(pets, slot, "|"), 1, ",")

    To change the value of slot to newvalue:

    Set value pets to replace(pets, "|" & tokenat(pets, slot, "|"), "|" & slot & "," & newvalue)

    If you just add variables to the list then just append to the end increasing the index each time.

    eg. "|4,cow|5,rock"

    If you want to remove values from the list then instead of "|index,value" think of it as "|id,value".

    pets="|1,dog|2,cat|3,fish"

    Getting the value of a slot is the same:

    tokenat(tokenat(pets, slot, "|"), 1, ",")

    To change the value of slot to newvalue is a bit more complicated:

    Set value pets to replace(pets, "|" & tokenat(pets, slot, "|"), "|" & tokenat(tokenat(pets, slot, "|"), 0, ",") & "," & newvalue)

    Then you can also remove a slot like so:

    Set value pets to replace(pets, "|" & tokenat(pets, slot, "|"), "")

    You could also try using a plugin instead of dealing with just text as it would probably be simpler.

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • only one of the "for each"s are needed

    object1 is the child object type,

    object2 is the parent object type.

    For each object1

    object2 | Pick instance with UID object2.variable

    ---- object1| follow object2

  • It's working here. I never saw the html5 loading animation, and it was just black initially so I refreshed the page and it runs.

  • Are you selecting the correct font name with the Text object?

    The file name is "vistor1.ttf" and the font name is "Visitor TT1 BRK".

  • The Canvas plugin does not use webgl so I would say that using sprites is faster.   Also sprites would use less memory since multiple instances share the same image, whereas the canvas has a separate image per instance.

    If you have webgl disabled you may get better performance by using one canvas and drawing rectangles to that, but you would have to do tests to see if that indeed is the case.