Steam installieren
Anmelden
|
Sprache
简体中文 (Vereinfachtes Chinesisch)
繁體中文 (Traditionelles Chinesisch)
日本語 (Japanisch)
한국어 (Koreanisch)
ไทย (Thai)
Български (Bulgarisch)
Čeština (Tschechisch)
Dansk (Dänisch)
English (Englisch)
Español – España (Spanisch – Spanien)
Español – Latinoamérica (Lateinamerikanisches Spanisch)
Ελληνικά (Griechisch)
Français (Französisch)
Italiano (Italienisch)
Bahasa Indonesia (Indonesisch)
Magyar (Ungarisch)
Nederlands (Niederländisch)
Norsk (Norwegisch)
Polski (Polnisch)
Português – Portugal (Portugiesisch – Portugal)
Português – Brasil (Portugiesisch – Brasilien)
Română (Rumänisch)
Русский (Russisch)
Suomi (Finnisch)
Svenska (Schwedisch)
Türkçe (Türkisch)
Tiếng Việt (Vietnamesisch)
Українська (Ukrainisch)
Ein Übersetzungsproblem melden
I need all the participants from 0 to 59, 38 and 22 switches on and so on ....
And now I have just mentioned by me above ....
-----------------------------------------------------------------------------
Зачем? Что он выполняет?
Мне нужны все участники от 0 до 59, влючая 38 и 22.... и т.д.
А сейчас у меня лишь указанные мной выше....
Without using "randomize();" at some point in your program prior to using the random function you aren't truly getting random results. The reason is that by default Gamemaker uses a preset random seed unless you tell it to "randomize();". They do it so that you can debug easier by always having your random functions play out in a predictable and repeatable way.
In other words... you'll only ever got those same results from random functions until you include randomize();
As for making random numbers unique each time, a relatively easy way to do this would be to create a ds_list and store all the numbers in it.
Now whenever you want to draw a random number, shuffle the list and then delete that value so it can never be drawn again.
if irandom(9)=0
{
position_destroy(352,96);
}
else if irandom(9)=1
{
position_destroy(384,96);
}
else if irandom(9)=2
{
position_destroy(416,96);
}
else if irandom(9)=3
{
position_destroy(448,96);
}
else if irandom(9)=4
{
position_destroy(480,96);
}
else if irandom(9)=5
{
position_destroy(512,96);
}
else if irandom(9)=6
{
position_destroy(544,96);
}
else if irandom(9)=7
{
position_destroy(576,96);
}
else if irandom(9)=8
{
position_destroy(608,96);
}
else if irandom(9)=9
{
position_destroy(640,96);
}
And not always it works. And this is very great need! Otherwise the game does not work out ...
---------------------------------------------------------------------------------------
И не всегда это срабатывает. А в этом очень огромная необходимость! Иначе игра не сложится...
See Random Number Generation[www.whitewoodencryption.com] to understand the major problems with using randomness in computer programming.
-----------------------------------------------------------------------------------
Ой, ой ой!!! ЭТО ВЕЛИКОЛЕПНО..... На воздавал 99 позиций рандома, а ты ужал всё в 2 строчки))) Вот оно образование!!!
Listen? And what about the music? I want it to play from the list. Shuffle and obsession
-----------------------------------------------------------------------------------
Послушай? А как быть с музыкой? Я хочу, чтоб она воспроизводилась из папки. В случайном порядке и зацикленно...
Is my code:
if irandom(1)=0
{
sound_replace(sound0,"sounds\s0.mp3",1,1)
sound_play(sound0)
}
else if irandom(1)=1
{
sound_replace(sound0,"sounds\s1.mp3",1,1)
sound_play(sound0)
}
if not sound_isplaying(sound0)
{
if irandom(1)=0
{
sound_replace(sound0,"sounds\s0.mp3",1,1)
sound_play(sound0)
}
else if irandom(1)=1
{
sound_replace(sound0,"sounds\s1.mp3",1,1)
sound_play(sound0)
}
}
If you want to play a random sound file, you can just use the choose() function.
I play a little melody randomly. I need this to happen after it ends (looped event)