dop2000's Forum Posts

  • You need to provide some details and/or share your project file.

  • The entry condition for the loop are "for each X element" and "ArrayName" = passed name argument from function

    ArrayName check should be the first condition!

    Did you set the ArrayName value correctly for each array? You can check this in the Debug Mode.

    Since every array object has only one instance, you don't really need the instance variable. You can just pick by array UID:

  • What?? That's incorrect. You need to delete records in a loop, in reverse order.

    For "n" from array.width-1 to 0
    Array.at(loopindex)=""
     ----> Array delete index loopindex from X axis
    
  • You can open the project in the LTS version - it will support SDK1 addons for another year.

    construct.net/en/make-games/releases/lts/r449-3

  • Also will this trigger once?

    + TextTime: Text is "00:00:00" (Ignore case)

    No, if someone runs your app on a 240 Hz monitor, this event will trigger 240 times per second and send 240 requests to the server.

    Also, comparing the time to "00:00:00" to detect the start of a new day is a bad idea, because the app might not be active at that exact second. Instead, save the current day in a variable and compare it every few seconds. If the day has changed - update the variable and send a new request to the server.

    As for comparing the time to sunrise - the server returns it in "HH:MM" format, you can use tokenat to extract the hours and minutes from the string.

    Local string sunriseTime‎ = 07:25
    Local string currentTime‎ = 04:07
    Local number minutesToSunrise‎ = 0
    
    -----> System: Set minutesToSunrise to (int(tokenat(sunriseTime, 0, ":"))-int(tokenat(currentTime, 0, ":")))×60 + (int(tokenat(sunriseTime, 1, ":"))-int(tokenat(currentTime, 1, ":"))) 
    
    --------+ If minutesToSunrise ≥ 0
    ---------> Text: Set text to int(minutesToSunrise÷60) & " hours " & zeropad(minutesToSunrise%60, 2) & " minutes to sunrise"
    
    --------+ Else
    ---------> Text: Set text to "Past the sunrise time"
    

    You can copy/paste this into your event sheet:

    {"is-c3-clipboard-data":true,"type":"events","items":[{"eventType":"block","conditions":[],"actions":[],"children":[{"eventType":"variable","name":"sunriseTime","type":"string","initialValue":"07:25","comment":"","isStatic":false,"isConstant":false},{"eventType":"variable","name":"currentTime","type":"string","initialValue":"04:07","comment":"","isStatic":false,"isConstant":false},{"eventType":"variable","name":"minutesToSunrise","type":"number","initialValue":"0","comment":"","isStatic":false,"isConstant":false},{"eventType":"block","conditions":[],"actions":[{"id":"set-eventvar-value","objectClass":"System","parameters":{"variable":"minutesToSunrise","value":"(int(tokenat(sunriseTime, 0, \":\"))-int(tokenat(currentTime, 0, \":\")))*60 +\r\n(int(tokenat(sunriseTime, 1, \":\"))-int(tokenat(currentTime, 1, \":\")))\r\n"}}],"children":[{"eventType":"block","conditions":[{"id":"compare-eventvar","objectClass":"System","parameters":{"variable":"minutesToSunrise","comparison":5,"value":"0"}}],"actions":[{"id":"set-text","objectClass":"Text","parameters":{"text":"int(minutesToSunrise/60) & \" hours \" & zeropad(minutesToSunrise%60, 2) & \" minutes to sunrise\""}}]},{"eventType":"block","conditions":[{"id":"else","objectClass":"System"}],"actions":[{"id":"set-text","objectClass":"Text","parameters":{"text":"\"Past the sunrise time\""}}]}]}]}]}
    
  • You need to pick the right enemy instance, which is pinned to the collision box.

    The easiest solution is to add both objects to the same container. They will be logically connected and will be picked automatically.

    construct.net/en/make-games/manuals/construct-3/project-primitives/objects/containers

    You should also use the hierarchy feature instead of the Pin behavior. Then you will be able to use "Pick child/parent" conditions to easily pick objects in the hierarchy. For example:

    Bullet on collision with EnemyCollisionBox
    EnemyCollisionBox pick parent Enemy : Enemy subtract 1 from health
    
  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • I need them to all hold individual variables and dictionary info per item, so I'd have no idea how to do that with individual frames.

    You should store all that info in one or several arrays/jsons. It's MUCH easier than manually enter it into instance variables. That's what we do in our game - the array holds about 300 cards:

    Also sorry, was that you saying how to do it? I'd understand a lot easier with the event sheet, I'm more of a visual learner.

    Which option? Creating from the list of objects, or using scripting?

  • 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.