4
0
Fork 0
This repository has been archived on 2023-09-15. You can view files and clone it, but cannot push or open issues or pull requests.
surprise_dungeon/objects/oGame/Create_0.gml
2020-12-06 20:12:21 +01:00

44 lines
721 B
Text

/// @description Insérez la description ici
// Vous pouvez écrire votre code dans cet éditeur
randomize();
audio_play_sound(snFond,1,true);
global.difficulty = 1;
global.minutes = 2;
global.secondes = 60;
global.transition = -1;
global.weapon = 0;
global.spawn = -1;
global.perdu = false;
for (i = 0; i < 4; i++)
{
for(j = 0; j < 4; j++)
{
coffre[i][j] = 0;
tableau[i, j] = irandom(10);
if (tableau[i, j] = 9) coffre[i,j] = 1;
}
}
posXfin = irandom(3);
posYfin = irandom(3);
tableau[posXfin, posYfin] = 11;
posX = irandom(3);
posY = irandom(3);
while(posXfin = posX and posYfin = posY) {
posX = irandom(3);
posY = irandom(3);
}
room_goto(asset_get_index("r" + string(tableau[posX, posY])));