Tomycase's Recent Forum Activity

  • Perfect! Here is the example then :

    This is the result I get : i.ibb.co/h7MFhfn/Example.gif

    3 enemies, I destroy them and the face appears gradually with the forcefield;

    This is how I achieved it :

    What I did, is to put all the enemies in a common family, and give a variable named "Activation" to the computer face sprite;

    When a sprite from the enemy family is destroyed, it adds 1 to "Activation"; When this variable reachs the number of enemy you want, it triggers that event once :

    "Wait 1 second > Repeat 4 times : Wait loopindex*(time you want) > opacity+25

    Loopindex represents the index of the current loop, in this event when it repeats 4 times, the first loop index = 0, second loop = 1, third loop = 2; etc (index always starts from 0 unless you use a "For" loop)

    The 4 loops trigger at the same time, but the wait action delay is equal to the loop index multiplied by the number of your choice, which means in the example that the first opacity adjustement triggers at 0*0.5 = 0s, second at 1*0.5 = 0.5s, third at 2*0.5 = 1s, etc;

    That way you have events that rely only on triggers instead of a loops with the result you wanted ^^

    Be careful however if you use that loopindex method to not use it into a looping condition, otherwise it will repeat constantly, it needs to be triggered a single time (with a trigger event or "trigger once while true);

    Btw unrelated but I guess your turrets and cannons works the same right? Because I see that you create two differents objects for each, meaning that you had to duplicate the code for each, when you could diplucate them on layout then mirror the sprites and use a single code, it would simplify things a lot; if you don't know how to do I can help on that too ~

  • I forgot to ask, do you have free version or complete version of Construct 2 ?

  • Well that's the problem, if the instances are destroyed, the program can't check their variables anymore as they're destroyed with the sprites, you would need to turn them invisible instead, but that can become a bit fastidious;

    There are better methods that relay only on triggers instead of loops, give me some time and I'll prepare an example for you ~

    EDIT : before I prepare the example, do you know about loopidex and how to use it?

  • Okay so, when you say "kill those sprites", you don't destroy them right? They are still somewhere in the layout? Just to be sure

  • Hi, to begin with, did you make sure that all the conditions are met so the sub events can run?

  • I found an issue about the NWjs zoom pinch (togglable with ctrl+mouse wheel) that can't be disabled in viewport, which can be very inconvenient if used by accident by an unexperimented player and can ruin the game display, as well as making ctrl+mousewheel impossible to use in the events;

    (I am using the latest version of NWjs for C2)

    Also I tried to add the "js-flags" property to the package to use the "--disable-pinch" flag following the example of this topic, but I get this error message :

    Any idea of what could be the cause? Thanks in advance ~

    Edit : I tried to put the flag and export the game but it still doesn't work

    Edit 2 : Found another bug, it seems to concern HTML elements only, I'm using a slider bar and a list in my project, and this is how it looks before and after export :

    My project is 1980x1080, tested with both Letterbox scale modes, resizable windows enabled and disabled, it happens everytime after export;

    (just tested with a previous version to be sure, the problem happens only in the latest one)

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • Wow I was about to message you since I know you are qualified when it comes to NWjs, I'll make a post in your topic right now, thanks!

  • Thanks for the answer, sadly it doesn't work, and I need letterscale anyway, I'll continue looking for a solution

  • Hello everyone, I recently discovered that NWjs allows the user to zoom/unzoom during runtime with CTRL+Mouse wheel, however it can be incovenient for a user who toggle it by accident, and can screw the game display, so my question is, is it possible to disable this function with a chromium arg or something?

    Thanks ~

    Tagged:

  • Alright, what is your language so I can make it easier for you to understand?

    Also tell me if I get it right : the goal of your game is that the player doesn't touch the blue zone, right?

  • Hi, I think I get your problem, it is because even if on top of your boat, the player is still overlapping the water, the overlapping doesn't take in account the z elevation, all those 3 objects are currently overlapping, what you need to do is use inverted condition, example : player is overlapping water + player is not overlapping boat, so the game can make the difference

  • Unless you use an ancient version of NWjs, this should not be a problem. If you experience this with the most recent version, I'll have to take a look at it.

    Yes all the problems I encountered are from the last version, the background process bug included

Tomycase's avatar

Tomycase

Member since 3 Apr, 2016

Twitter
Tomycase has 6 followers

Trophy Case

  • 9-Year Club
  • Forum Contributor Made 100 posts in the forums
  • Regular Visitor Visited Construct.net 7 days in a row
  • Steady Visitor Visited Construct.net 30 days in a row
  • Enduring Visitor Visited Construct.net 90 days in a row
  • RTFM Read the fabulous manual
  • Email Verified

Progress

15/44
How to earn trophies