dop2000's Forum Posts

  • 15k object in the family

    That's a bit insane. I would definitely combine these objects into sprites (as separate animations).

    Your best bet is to make a list of all family objects - you can get it from the family.json file if you save the project as a folder. Then create each object from the list using "Create by name" action.

    Or you can do this with Javascript:

    const f = runtime.objects.FamilyName;
    for (const t of f.getAllObjectTypes()) {
     runtime.objects[t.name].createInstance(layer,x,y);
    }
    
  • You can try outline effects instead, but they don't work well with some fonts.

    Or create a spritefont with the embedded outline:

    construct.net/en/forum/game-development/tools-and-resources-27/sprite-font-generator-v3-64038

  • You can use a global variable SafeZone. Set it to true (or 1) when the player enters the safe zone, stop all enemies. Set the variable to false (or 0) on exit. In all enemy events add a condition checking that the variable is false.

    Another option is to put enemy events in a group and disable that group when the player is in the safe zone.

  • This has happened before. Report it as false positive and ignore.

  • Yeah, I really wish dragging events would be improved. Sometimes it’s impossible to place an event inside another one without creating an empty sub-event first.

  • You can try making the iframe object global - then it will not be destroyed when switching to another layout. You should be careful though not to create duplicate iframes when returning to the first layout.

  • Pics would definitely help to understand your question. You can upload them to any service like imgur and post links here.

  • Why do you use Browser.execJS? All these operations can be done with the Date plugin.

    Also, your 4th event on the screenshot will run AJAX request on every tick while the condition is true - the server may not like it and will ban your IP address.

    Can you show the AJAX response - JSON contents?

    To convert the current time to minutes use these expressions:

    // Minutes since midnight (UTC time)
    int((Date.now % 86400000) / 60000)
    
    // Minutes since midnight (local time)
    Date.GetHours(Date.Now)*60+Date.GetMinutes(Date.Now)
    
    // Minutes since the start of the current hour (local time)
    Date.GetMinutes(Date.Now)
    
    
  • Ok, so modify the code a little:

    + Array: For each XY element
    + Array: Current value = 1
    ----+ Sprite: X = Array.CurX×64+832
    ----+ Sprite: Y = Array.CurY×64+64
    -----> Sprite: Set visibility Visible
    
  • You can add instance variables to the sprite — indexX and indexY — and fill them with values: indexX from 0 to 4, and indexY from 0 to 9.

    Then you’ll be able to pick the sprite instance corresponding to any array element.

    Another option is to pick the sprites based on their position. Assuming your first sprite's position is (0,0), you can do this:

    + Array: For each XY element
    + Array: Current value = 1
    ----+ Sprite: X = Array.CurX×64
    ----+ Sprite: Y = Array.CurY×64
    -----> Sprite: Set visibility Visible
    
  • As I explained in your other post, you need to pick the enemy instance. Picking is very important in Construct. If you don't pick the correct instance or instances, the event applies to all instances.

  • In the second event, you need to pick the enemy instance which each Pikmin is pinned to.

    For each Pikmin
    System Pick Enemy By Evaluate Enemy.UID=Pikmin.Pin.PinnedUID
    

    That's why I suggested using the hierarchy - it's a lot easier because you can use "pick children" and "pick parent" conditions.

  • I can't read a word but it sure seems like somebody went through a lot of effort to tease out a lot of the engine quirks.

    That's WilsonPercival (Igor in RL), he's a brilliant programmer, started with Construct Classic. He has submitted over 800 bug reports! So yeah, he probably understands the engine better than any of us.

  • There was a similar thing my friend done (its in russian though), with some insights he managed to dig from a lot of testing and digging the internals.

    Hey, you are friends with WilsonPercival too! He has done a lot for C3, but you should take some his findings and suggestions with a grain of salt, though. For instance, I really don't like his idea of using "Wait for previous action to complete" instead of "Wait 0". Just because it works doesn't mean it's correct.

    I agree that a community-driven list of Best Practices would be a great idea, but ideally we'd need Scirra's involvement (for moderation and guidance) to keep it accurate and prevent risky guesswork.

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • I managed to have the "on path found" work, but no more than 2 butterflies can move at a time, and I need ALL of them to be moving

    Can you show your updated events?