Entrar
Últimos assuntos
» Como ajustar velocidade de cada frame da animação no game makerpor Ralphed Ontem à(s) 18:28
» PROBLEMAS COM FÍSICAS DE ÁGUA
por aminaro Ter 16 Abr 2024, 10:07
» Retorno da GMBR!!!
por Ralphed Sex 12 Abr 2024, 22:45
» JOGADOR PARANDO NO AR QUANDO ATACA
por aminaro Qua 10 Abr 2024, 13:51
» Problemas com texto interativo
por Kaaru72 Dom 07 Abr 2024, 11:31
» Erro escondido e indecifrável
por dev_gabize.azv Qui 04 Abr 2024, 10:11
» Mudar cor de apenas uma palavra
por Ralphed Sáb 30 Mar 2024, 00:39
» Procuro Programador de game maker
por Wou Sex 15 Mar 2024, 10:27
» Mod APK
por gamerainha Qua 13 Mar 2024, 06:30
» Aceito pedidos de sprites (Com exemplos meus)
por Sevilha Qua 28 Fev 2024, 12:17
» Inventário simples
por Isquilo_Roedor Qui 22 Fev 2024, 15:18
» Problemas na programaçnao de inimigo [jogo DOOM LIKE]
por Black Mirror Dom 11 Fev 2024, 13:34
» ANDROID MULTI TOUCH
por DiegoBr Dom 04 Fev 2024, 12:13
» Servidor de Discord do fórum?
por Lighter Sáb 27 Jan 2024, 17:18
» Save e Load Json
por Klinton Rodrigues Qui 25 Jan 2024, 11:12
» Colisão com mais de um objeto
por aminaro Seg 22 Jan 2024, 15:02
» Oi sou novo aqui
por Thiago Silveira Alexandre Sáb 20 Jan 2024, 20:55
» Como acessar conteudo comprado no marketplace
por macmilam Sex 19 Jan 2024, 07:42
» Devlogs em vídeos do Block Room
por Joton Seg 15 Jan 2024, 16:56
» Alguém aqui já ganha dinheiro com seus games?
por Joton Seg 15 Jan 2024, 16:49
» ACERVO GMBR MAGAZINE
por Joton Qui 11 Jan 2024, 19:21
» como aumentar o obj sem aumentar a colisão??
por GabrielXavier Qua 10 Jan 2024, 07:21
» Asteroid Core - Early Acesse Update [0.2.0.0]
por JOZ. Seg 08 Jan 2024, 14:39
» Versionamento de código com GitHub
por GabrielXavier Seg 08 Jan 2024, 07:32
» Rio Rise - novo launcher do Gta San Andreas SAMP Brasil
por kolesovsup Sex 29 Dez 2023, 07:16
Seqüência aleatória!
2 participantes
Página 1 de 1
Seqüência aleatória!
Digamos assim, tenho um obj_controle, que controla uma sequencia aleatória de soma! ou seja:
Sequencia 1 cria 3 sprites:
Sequencia 2 cria 4 sprites:
Sequencia 3 cria 5 sprites:
Ai assim, na sequencia 1 ele cria, e espera eu clicar em cima dos , e se eu clicar na sequencia que ele pediu, parte para a próxima sequencia que será os 3 primeiros e mais um! Se acaso eu errar os sprites ele repete e sequencia 1 até eu acertar! Ai assim, quando acabar as chances de acertar, volta para o menu(room_goto) ou (game_restart) e que a sequencia que vier depois, não seja a mesma do que a anterior ou seja: entendem? TIPOW QUE CRIE UMA SEQUENCIA ALEATÓRIA E REPITA, E SE NÃO COPIAR A MESMA SEQUENCIA QUANDO DER RESTART JA TA "BÃO"! =D depois eu posso me virar com as paradas de acertar =D +REP
Sequencia 1 cria 3 sprites:
Sequencia 2 cria 4 sprites:
Sequencia 3 cria 5 sprites:
Ai assim, na sequencia 1 ele cria, e espera eu clicar em cima dos , e se eu clicar na sequencia que ele pediu, parte para a próxima sequencia que será os 3 primeiros e mais um! Se acaso eu errar os sprites ele repete e sequencia 1 até eu acertar! Ai assim, quando acabar as chances de acertar, volta para o menu(room_goto) ou (game_restart) e que a sequencia que vier depois, não seja a mesma do que a anterior ou seja: entendem? TIPOW QUE CRIE UMA SEQUENCIA ALEATÓRIA E REPITA, E SE NÃO COPIAR A MESMA SEQUENCIA QUANDO DER RESTART JA TA "BÃO"! =D depois eu posso me virar com as paradas de acertar =D +REP
Re: Seqüência aleatória!
Eu usaria listas pra controlar esses eventos.
Vc vai precisar basicamente de listas, alarmes e eventos de clique no mouse.
Vc pode fazer uma lista de sprites (ou mesmo objetos).
Antes de começar a mostrar os sprites, vc pode embaralha-los... com o ds_list_suffle();
Pra vc adicionar mais um sprite na sua sequencia vc vai usar o ds_list_add();
E assim sucessivamente.
Abaixo botei todos os códigos pra vc usar as listas (ds_list):
ds_list_create() Creates a new list. The function returns an integer as an id that must be used in all other functions to access the particular list.
ds_list_destroy(id) Destroys the list with the given id, freeing the memory used. Don't forget to call this function when you are ready with the structure.
ds_list_clear(id) Clears the list with the given id, removing all data from it but not destroying it.
ds_list_copy(id,source) Copies the list source into the list with the given id.
ds_list_size(id) Returns the number of values stored in the list.
ds_list_empty(id) Returns whether the list is empty. This is the same as testing whether the size is 0.
ds_list_add(id,val) Adds the value at the end of the list.
ds_list_insert(id,pos,val) Inserts the value at position pos in the list. The first position is 0, the last position is the size of the list minus 1.
ds_list_replace(id,pos,val) Replaces the value at position pos in the list with the new value.
ds_list_delete(id,pos) Deletes the value at position pos in the list. (Position 0 is the first element.)
ds_list_find_index(id,val) Find the position storing the indicated value. If the value is not in the list -1 is returned.
ds_list_find_value(id,pos) Returns the value stored at the indicated position in the list.
ds_list_sort(id,ascend) Sorts the values in the list. When ascend is true the values are sorted in ascending order, otherwise in descending order.
ds_list_shuffle(id) Shuffles the values in the list such that they end up in a random order.
ds_list_write(id) Turns the data structure into a string and returns this string. The string can then be used to e.g. save it to a file. This provides an easy mechanism for saving data structures.
ds_list_read(id,str) Reads the data structure from the given string (as created by the previous call).
Vc vai precisar basicamente de listas, alarmes e eventos de clique no mouse.
Vc pode fazer uma lista de sprites (ou mesmo objetos).
Antes de começar a mostrar os sprites, vc pode embaralha-los... com o ds_list_suffle();
Pra vc adicionar mais um sprite na sua sequencia vc vai usar o ds_list_add();
E assim sucessivamente.
Abaixo botei todos os códigos pra vc usar as listas (ds_list):
ds_list_create() Creates a new list. The function returns an integer as an id that must be used in all other functions to access the particular list.
ds_list_destroy(id) Destroys the list with the given id, freeing the memory used. Don't forget to call this function when you are ready with the structure.
ds_list_clear(id) Clears the list with the given id, removing all data from it but not destroying it.
ds_list_copy(id,source) Copies the list source into the list with the given id.
ds_list_size(id) Returns the number of values stored in the list.
ds_list_empty(id) Returns whether the list is empty. This is the same as testing whether the size is 0.
ds_list_add(id,val) Adds the value at the end of the list.
ds_list_insert(id,pos,val) Inserts the value at position pos in the list. The first position is 0, the last position is the size of the list minus 1.
ds_list_replace(id,pos,val) Replaces the value at position pos in the list with the new value.
ds_list_delete(id,pos) Deletes the value at position pos in the list. (Position 0 is the first element.)
ds_list_find_index(id,val) Find the position storing the indicated value. If the value is not in the list -1 is returned.
ds_list_find_value(id,pos) Returns the value stored at the indicated position in the list.
ds_list_sort(id,ascend) Sorts the values in the list. When ascend is true the values are sorted in ascending order, otherwise in descending order.
ds_list_shuffle(id) Shuffles the values in the list such that they end up in a random order.
ds_list_write(id) Turns the data structure into a string and returns this string. The string can then be used to e.g. save it to a file. This provides an easy mechanism for saving data structures.
ds_list_read(id,str) Reads the data structure from the given string (as created by the previous call).
fredcobain- Games Ranking :
Data de inscrição : 14/04/2011
Reputação : 163
Número de Mensagens : 692
Prêmios :
x 0 x 3 x 0
x 0 x 0 x 0
x 0 x 0 x 0
Re: Seqüência aleatória!
E ME TIRARAM REPUTAÇÃO DESSA AKI TBM! AFFF QUEM É O CRIANÇA BRINCANDO COM MINHA REPUTAÇÃO? Vlws Fred eu vou tentar isso o que vc falou! Quem tirou minha rep aki tbm eu quero saber!
Re: Seqüência aleatória!
Soul, mande uma MP para os moderadores. Ou vc deu aluma mancada, ou houve um erro mesmo....
fredcobain- Games Ranking :
Data de inscrição : 14/04/2011
Reputação : 163
Número de Mensagens : 692
Prêmios :
x 0 x 3 x 0
x 0 x 0 x 0
x 0 x 0 x 0
Tópicos semelhantes
» Room aleatoria
» [RESOLVIDO]Movimentação aleatoria
» [Help] :confused: barra aleatoria
» Room inicial ser aleatória.
» criar um objecto numa posiçao aleatoria
» [RESOLVIDO]Movimentação aleatoria
» [Help] :confused: barra aleatoria
» Room inicial ser aleatória.
» criar um objecto numa posiçao aleatoria
Página 1 de 1
Permissões neste sub-fórum
Não podes responder a tópicos
|
|