Von Perkele's Forum Posts

  • Hi, the text box is there purely for testing purposes. If you understand how my example works you understand that the important part is the number generation event. You can trigger the number generation events anyway you want and then use the numbers any way you want from the array, it does not matter whether you trigger the number generation with a button or print the generated numbers out in text or sprite font objects or use them in some other way.

  • Thanks.

    You can copy the template and experiment with the different effects if you want use something similar in your projects.

  • Yes if you set up the events the right way.

    You should make the boss attack "if boolean 'pain state' is not true".

    You can put a timer to the pain state boolean so it gets reset to not true always after a while.

    If you use functions you should remember that the whole function is run immediately when called. The boss can not go in pain state mid function, the boss either is or is not in pain state the moment the function is called. You should set you events in a way that the attack functions are not executed if the boss is in pain state. Since the functions are run immediately when called it makes no sense to try to stop the function if the boss is in pain state, it's way more practical to check if the boss is in pain state before the attack function is executed.

  • Hi, I have been working on this UI template. I would appreciate feedback about it.

    I'm putting all the UI menus on their own layers and transition between them by changing the layers' scale and opacity. Is the performance poor in you computer with this effect?

    The UI menu layers all have their own event groups that get automatically activated/deactivated with the menu change.

    Are the menus, buttons and text boxes intuitive to use?

    I have just created the world creation screen, is it intuitive to use?

    Is the visual design appealing?

    You have to run the whole project (not just the layout) for the arrays to load the proper info in the beginning of the project.

    Thanks in advance if you take the time to test it!

    dropbox.com/s/0v8uie7pixtbu4b/UI_Template.c3p

  • I suppose you could add a simple boolean to the boss. You would call it "PainState" and allow the boss to run its attack function only if its not in pain state, otherwise use system action "stop loop".

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • Yeah looping the layers is not a problem, that part is working well.

    But If I could have gotten the layer name as a string I could have automatically disabled the event group connected to that layer since I use similar naming technique with groups as well.

    I have named the layers "UI_Menu_" & group name. This enables me to activate the selected group with a string variable set as the event group name, but disabling the layer groups is more tricky. I guess I just need to use 2 strings, one for active group name and one for the group last activated before the current group was activated. That isn't so bad, but getting the layer names would have simplified it.

  • There doesn't seem so be a command for this. Is it only possible to handle things the other way around (getting layer index from its name).

    I have a system that has all the UI menu screens as different layers and a loop that goes through each layer setting it's scale, visibility etc. I'm trying to automate it to deactivate/activate groups as well since each layer has its own group.

  • You do not have permission to view this post

  • I changed your project so you can see how it will work with your project.

    dropbox.com/s/ftfvubq31i9hcwr/Testing%20%282%29.c3p

  • You want to randomly pick values and save that data for later use, correct? That is exactly what my example does. In my example the values are stored in the array. You can use the values of that array in any layout you want, the array data will remain the same until you change it.

  • The best way to do this in this case is probably using either an array or dictionary.

    So pick those random words to a an array for later use.

    This is a simple example that creates 10 objects and then randomly places those objects in the array. Of course you could make your own probability tables the objects etc.

    dropbox.com/s/zqiemzef8motlrv/RandomObjectListSavedInArray.c3p

  • It's a while loop that runs the number of times you need to create the object. Naturally you can make it run with any number of conditions. If you set up a loop they run like any other events, as long as all the conditions are true.

  • Hi,

    I think the problem is in the way Construct 3 engine handles object creation. I think that if you create multiple same objects the engine is unavailable to process the objects' X and Y coordinates in relation to one another before that tick has passed.

    This naturally makes it difficult to ensure that 100 objects that are created simultaneously the same tick in random position don't overlap. Maybe someone else can correct me on this.

    At least one solution that works is to create your new objects one at time each tick...Like this:

    dropbox.com/s/tsedvs4mqd4hdvm/PreventObjectOverlapAtCreation.c3p

  • Yeah I guess I have to do that, couldn't get it to work the way I wanted.