dop2000's Forum Posts

  • I don't understand your data structure... If there are many different dictionaries, how do you expect to get only one dictionary in the end?

    Anyway, here is a demo I made, maybe it will help. It first wraps 5 dictionary instances into other dictionaries several times, then restores them.

    https://www.dropbox.com/s/oc4i65d0wqm13 ... .capx?dl=0

  • Привет, kop9000

    That plugin does a simple typewriter effect (with a few variations). There are plenty of examples how to do this with events, google "Construct 2 typewriter". Here are a couple of links:

    viewtopic.php?t=63552

    https://www.dropbox.com/s/d4396pwak0oh7 ... .capx?dl=0

  • I would do this the other way around:

    Why do you need this array anyway? You have a bunch of text instances, create an instance variable and fill it with random values.

    I'm saying this in every post - arrays in C2/C3 are overrated. Most tasks that people are trying to do with arrays, can be done easier with instance variables.

  • No need for a button, any touch event will do. It's the same in C2.

    This is not something specific to C2 or C3, it's a browser limitation, you can't request full screen without user interaction.

    I believe when you build your mobile app, then you can switch to full screen straight away.

  • You can only request full screen after a touch event (but not "on Touch start"). For example:

    On any touch end: Browser Request Fullscreen

  • Add a tag "music" to your music playback. Change your event to this:

    Audio Tag "music" is NOT playing -> Audio play "MyMusic.mp3" with tag "music"

    What do you want to control will this slide bar - music volume?

    On slidebar change -> Audio set "music" volume to slidebar.value

    Here is how you properly change audio volume:

  • Hi irina

    I replied you in PM.

  • So basically take a random item from the inventory and drop it on the ground? You shouldn't have used the word "spawn", it usually means creating something new

    Anyway, here is the code:

  • worm1

    Here you go:

    https://www.dropbox.com/s/phwh7xejbayll ... .capx?dl=0

    Simple code, no arrays. You can even remove the ID variable and use IID instead.

  • Seriously, why do you need this array? Working with instance variables in C2 is much easier than working with 2D arrays.

    If you are sure that you need the array, consider doing this:

    Create 1-dimentional array, set Global=No, add it to the same container with the sprite. Now each instance of sprite will have its own instance of array for values. Sprite+array in each pair will be logically linked together, you'll not need the ID variable. You can pick a sprite and its own array will be picked automatically, and vice versa.

    This code will search all arrays for a number N and destroy sprites (and their arrays) if the number is found:

    For each Array
       Array For Each X Element 
           Array Current value = N    ->  Sprite destroy   
    [/code:ak13oj4u]
  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • You can add gravity to Bullet behavior, don't need physics for that.

  • Try adding these actions before the "AAAT acquire target":

    AAAT clear turret targets

    System Wait 0

    If this doesn't help, could you share your capx?

  • It depends.. If your objects are simple shapes (circles, rectangles), you can do this with math.

    If you need to roughly detect several stages of overlapping (touching, some overlapping, overlapping a lot), you can scale down the original sprite to 0.9, 0.5, 0.2 etc., every time checking if it's still overlapping another sprite. And after that return it to 100% size. Overlapping checks are quite fast, so you can do all this in one tick.

    Also you may find some useful ideas in this post:

  • I made quite a lot of changes, enjoy!

    https://www.dropbox.com/s/dtcc5uplj25gw ... .capx?dl=0

  • Or use a dictionary. You can store "box1", "box2", "box3" keys in a dictionary and access them using expressions like Dictionary.Get("box"&N)