R0J0hound's Recent Forum Activity

  • Instead of "for" use "repeat 6 times" and instead of loopindex use:

    Array.Height-loopindex

  • You could something like this:

    global number max_value=0

    every tick:

    Set max_value to max(var1,var2,var3,var4,var5,var6)

    max_value=var1:

        do stuff

    max_value=var2:

        do stuff

    max_value=var3:

        do stuff

    max_value=var4:

        do stuff

    etc...

  • Those two conditions are triggers as defined in edittime.js:

    AddCondition(3, cf_trigger, "On went online", "Browser", "On went online", "Triggered when user is offline and a connection becomes available.", "OnOnline");
    AddCondition(4, cf_trigger, "On went offline", "Browser", "On went offline", "Triggered when user is online and the connection becomes unavailable.", "OnOffline");

    The following code from runtime.js is what causes "OnOnline" to be triggered:

    window.addEventListener("online", function() {     self.runtime.trigger(cr.plugins_.Browser.prototype.cnds.OnOnline, self);
    });
  • If that's the case then here is an updated version that is easier on the eyes among many other things:

    http://dl.dropbox.com/u/5426011/examples16/nodes3.capx

    FYI the nodes evaluate somewhat like a circuit so values can take time to move through the nodes.

    What's your project about?

  • If I can't get 1 to work the way I want it I usually skip 2 and 3 and go straight to 4, because at that point I have full control of what happens. The math isn't too bad since you can find tutorials that have the formulas ready for you. Collision response will probably be the most involved aspect.

    For an exercise I followed the tutorial here:

    http://chrishecker.com/Rigid_body_dynamics

    And made a capx:

    dropbox.com/scl/fi/opwp880r5yj0d73tmt6wu/2dphysics.capx

    I skipped the angular motion, and it will lock up if you design a layout with objects overlapping, but other than that it looks alright. The collisions are pretty crisp due to the method used in the tutorial, but it's pretty slow when many collisions occur at once.

    I tried reproducing it with the physics behavior and I can't get it to act the same. The break doesn't look as good and there is energy loss.

    uc7cec312b5eb10bf6c698016a8f.dl.dropboxusercontent.com/cd/0/get/Ch_iWdiLJy3ic7ZPiE8_J-WRSC9GsljNCJUzW_dNecTK_gE8__C9dhJUiXYKfDaNMB3_e1rMhI6Vd3hRlTtstg-y96JdM-RfAUmo87Jm9daNCJiyM3Vtx7JLQdbUnpOOijM/file

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • While it's true that transparent sprites are still rendered, if you make a sprite invisible it isn't rendered at all.

  • It can be done with the erase effect:

    http://dl.dropbox.com/u/5426011/fixed/robit_studios.cap

    Layer 2 has "force own texture" checked and the erase effect was given to the grey tiled background.

  • I'd like to add that you can do ranma's method without an instance variable. Just use random(1) as the expression in for each ordered.

  • Use SOL.Sprite to access the newly created sprite.

    System.Create("Sprite", 1, 0, 0)
    SOL.Sprite.angle = 45

    SOL stands for "selected object list" and allows access to what was picked with events.

    For your example it's better to get the sprite count with Sprite.Count as new objects are not added to the list until after the next toplevel event.

  • Using an array would be faster for the flood fill, but it may take more events.

  • -------------------------------------------------------------

    "Unfortunately I usually only reply after implementing a solution that works."

    I don't know if that was a jab at me personally, but

    If not:

    -----> I think the best method to help teach people is one of cooperation and joint trial and error. Teach a man to fish and all that.

    if so:

    ----->go &*@# yourself.

    -------------------

    There was no jab intended. I was simply stating how I operate.

    EDIT:

    RandomDood here is the flood fill cap example:

    http://dl.dropbox.com/u/5426011/examples16/floodfill.cap

  • Everyone is so mournful in the CC forums. For the record I read new postings in the CC section just as often as the C2 section if anyone thinks they go unread. Unfortunately I usually only reply after implementing a solution that works.

    Anyway,

    RandomDood in C2 two objects that are touching but not overlapping count as an overlap. So when the the sprite is 32x32 other sprites in all 8 directions are overlapping. With 16x32 others above and below will overlap, and with 32x16 only horizontal will overlap.

    When converting from C2 to CC or vise versa the subtle differences can pose a problem so I usually try to understand what one is doing an then implement it from scratch into the other.

    I need to get to sleep now, but I'll try to wip up an example in CC tomorrow.

R0J0hound's avatar

R0J0hound

Member since 15 Jun, 2009

Twitter
R0J0hound has 157 followers

Connect with R0J0hound