Arrays and loops i sound


#1

Hello everyone.
I have been working a couple of days with the application and I really find the work they have done surprising. Keep in that way.
For the same reason I have found a couple of things that could well be implemented / improved in the future.
I was trying to work with audio (making a loop) per is complicated, because when inserting the audio generates a small empty space before starting, so the loop does not work. On the other hand I was implementing some code (I’m a Graphic Designer, not a programmer) that I had worked with before. Basically I generated a random array and it works, however when I want to recover one of the values ​​in any position, example: myArray [A, B, C, D, E] and I want to use myArray [3], I should recover the element C. The bad thing is that when I run and check the console, it sends me the data as undefined.

I wish they could help me since I like their job and I hope to do a couple of things with Wicked.

Really, congratulations for the work you are doing.


#2

Hi @Donccb. Mind sending us your file? You should be able to link it here, or send it in a private message to me. It will make it easier for us to find the problem!

Also, we’ll be doing an audio update soon that will hopefully fix these issues!


#3

I was checking and I was making calls to the elements of my arrangement. For the tests I made a small code that worked. I share it with you since it gives a basic example of a for cycle, an arrangement and a call to an element of it.
I am doing tests with a sidescroll and it is working, although at the moment of running it on a mobile it does not work. Is there any way to activate touch detection on the screen?
Thanks for answering.

++++++++++++++++++++++++++++++++++++++++++++++++

var azarFicha;
var cargaFicha = [""];

function generaArrayEnRandom() {
for (i = 1; i <= 10; i++) {
azarFicha = Math.floor((Math.random() * 4) + 1);
cargaFicha[i] = azarFicha;
}
muestraEnConsola();
}

function muestraEnConsola() {
console.log(cargaFicha);
console.log(cargaFicha[3]);
}

generaArrayEnRandom();

+++++++++++++++++++++++++++++++++++++++++++

Greetings.