GMBR
Gostaria de reagir a esta mensagem? Crie uma conta em poucos cliques ou inicie sessão para continuar.
Entrar

Esqueci-me da senha

Últimos assuntos
» Como ajustar velocidade de cada frame da animação no game maker
por 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

Ir para baixo

Seqüência aleatória! Empty Seqüência aleatória!

Mensagem por Limalokão Ter 24 maio 2011, 14:01

Digamos assim, tenho um obj_controle, que controla uma sequencia aleatória de soma! ou seja:

Sequencia 1 cria 3 sprites: Cool Laughing Happy
Sequencia 2 cria 4 sprites: Cool Laughing Happy What a Face
Sequencia 3 cria 5 sprites: Cool Laughing Happy What a Face affraid

Ai assim, na sequencia 1 ele cria, e espera eu clicar em cima dos Cool Laughing Happy , 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: Cool Laughing Happy 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
Limalokão
Limalokão

Games Ranking : Nota C

Notas recebidas : C
Data de inscrição : 24/11/2009
Reputação : 10
Número de Mensagens : 805
Prêmios : Seqüência aleatória! Empty

Medalhas x 0 Tutoriais x 1 Moedas x 0

Ouro x 0 Prata x 0 Bronze x 0

Insignia 1 x 0 Insignia 2 x 0 Insignia 3 x 0
Plataformas :
  • Game Maker 8.0 ou 8.1
  • Game Maker Studio 1.4
  • Game Maker Studio 2.0


https://llgd.com.br

Ir para o topo Ir para baixo

Seqüência aleatória! Empty Re: Seqüência aleatória!

Mensagem por fredcobain Qua 25 maio 2011, 09:44

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).
fredcobain
fredcobain

Games Ranking : Sem avaliações

Data de inscrição : 14/04/2011
Reputação : 163
Número de Mensagens : 692
Prêmios : Seqüência aleatória! Empty

Medalhas x 0 Tutoriais x 3 Moedas x 0

Ouro x 0 Prata x 0 Bronze x 0

Insignia 1 x 0 Insignia 2 x 0 Insignia 3 x 0

Ir para o topo Ir para baixo

Seqüência aleatória! Empty Re: Seqüência aleatória!

Mensagem por Limalokão Qua 25 maio 2011, 12:32

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!
Limalokão
Limalokão

Games Ranking : Nota C

Notas recebidas : C
Data de inscrição : 24/11/2009
Reputação : 10
Número de Mensagens : 805
Prêmios : Seqüência aleatória! Empty

Medalhas x 0 Tutoriais x 1 Moedas x 0

Ouro x 0 Prata x 0 Bronze x 0

Insignia 1 x 0 Insignia 2 x 0 Insignia 3 x 0
Plataformas :
  • Game Maker 8.0 ou 8.1
  • Game Maker Studio 1.4
  • Game Maker Studio 2.0


https://llgd.com.br

Ir para o topo Ir para baixo

Seqüência aleatória! Empty Re: Seqüência aleatória!

Mensagem por fredcobain Qua 25 maio 2011, 16:02

Soul, mande uma MP para os moderadores. Ou vc deu aluma mancada, ou houve um erro mesmo....
fredcobain
fredcobain

Games Ranking : Sem avaliações

Data de inscrição : 14/04/2011
Reputação : 163
Número de Mensagens : 692
Prêmios : Seqüência aleatória! Empty

Medalhas x 0 Tutoriais x 3 Moedas x 0

Ouro x 0 Prata x 0 Bronze x 0

Insignia 1 x 0 Insignia 2 x 0 Insignia 3 x 0

Ir para o topo Ir para baixo

Seqüência aleatória! Empty Re: Seqüência aleatória!

Mensagem por Conteúdo patrocinado


Conteúdo patrocinado


Ir para o topo Ir para baixo

Ir para o topo

- Tópicos semelhantes

 
Permissões neste sub-fórum
Não podes responder a tópicos