Entrar
Últimos assuntos
» Colisões não funcionandopor RastaMaan Hoje à(s) 19:49
» Como ajustar velocidade de cada frame da animação no game maker
por pequetux Hoje à(s) 16:45
» Preciso de ajuda
por AftonDuGrau Dom 21 Abr 2024, 20:18
» Como faz o evento drawn GUI, não se repetir?
por aminaro Sex 19 Abr 2024, 20:30
» 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
[RESOLVIDO]''PLAYER TRAVA NA BARRA''
3 participantes
Página 1 de 1
[RESOLVIDO]''PLAYER TRAVA NA BARRA''
Eai pessoal, no meu jogo tem uma barra q vai da direita para esquerda, meu player pula em cima dela tranquilo e tudo vai certo! só que quando ele colide na lateral na barra ele trava:
eu queria q quando a PLAYER batesse na lateral a BARRA voltasse para a direção inversa!
''DESDE JA OBRIGADO''
FLWS!
Projetos completos
SUPER MARIO MAZE: https://gmbr.forumeiros.com/galeria-de-projetos-completos-f6/super-mario-maze-101bugs-retirados-t1824.htm
SUPER ARKANOID X: https://gmbr.forumeiros.com/galeria-de-projetos-completos-f6/super-arkanoid-x-versao-atualizada24-01-09-t1889.htm
Projetos em desenvolvimento:
Tankpanzer: 20% Concluído
Robot 27: 20% Concluído
The war of Archer: the escape of the witch: 15% Concluído
Engines:
Engine de pause: https://gmbr.forumeiros.com/engines-f12/engine-de-pause-t2190.htm
Engine healthbar segui a tela: https://gmbr.forumeiros.com/engines-f12/engine-para-o-health-seguir-a-tela-t2036.htm
Engine healthbar para o inimigo: https://gmbr.forumeiros.com/engines-f12/engine-health-bar-para-o-inimigo-t2035.htm
O prêmio por uma coisa bem feita é tê-la feito.
eu queria q quando a PLAYER batesse na lateral a BARRA voltasse para a direção inversa!
''DESDE JA OBRIGADO''
FLWS!
Projetos completos
SUPER MARIO MAZE: https://gmbr.forumeiros.com/galeria-de-projetos-completos-f6/super-mario-maze-101bugs-retirados-t1824.htm
SUPER ARKANOID X: https://gmbr.forumeiros.com/galeria-de-projetos-completos-f6/super-arkanoid-x-versao-atualizada24-01-09-t1889.htm
Projetos em desenvolvimento:
Tankpanzer: 20% Concluído
Robot 27: 20% Concluído
The war of Archer: the escape of the witch: 15% Concluído
Engines:
Engine de pause: https://gmbr.forumeiros.com/engines-f12/engine-de-pause-t2190.htm
Engine healthbar segui a tela: https://gmbr.forumeiros.com/engines-f12/engine-para-o-health-seguir-a-tela-t2036.htm
Engine healthbar para o inimigo: https://gmbr.forumeiros.com/engines-f12/engine-health-bar-para-o-inimigo-t2035.htm
O prêmio por uma coisa bem feita é tê-la feito.
Última edição por Alex FC em Sex 06 Fev 2009, 15:45, editado 2 vez(es)
Re: [RESOLVIDO]''PLAYER TRAVA NA BARRA''
coloca na barra com a colisao com o player:
- Código:
vspeed *= -1;
Re: [RESOLVIDO]''PLAYER TRAVA NA BARRA''
eu fiz essse codigo só q quando o player pula em cima a barra só fica indo pra esquerda!e meu player pula em cima da barra para ir de um lugar para o outro!
o problema é na lateral esquerda e direita da barra! o player sobe em cima da barra sem problemas! mas quando ele colide na lateral da barra ele trava!
flws!
Projetos completos
SUPER MARIO MAZE: https://gmbr.forumeiros.com/galeria-de-projetos-completos-f6/super-mario-maze-101bugs-retirados-t1824.htm
SUPER ARKANOID X: https://gmbr.forumeiros.com/galeria-de-projetos-completos-f6/super-arkanoid-x-versao-atualizada24-01-09-t1889.htm
Projetos em desenvolvimento:
Tankpanzer: 20% Concluído
Robot 27: 20% Concluído
The war of Archer: the escape of the witch: 15% Concluído
Engines:
Engine de pause: https://gmbr.forumeiros.com/engines-f12/engine-de-pause-t2190.htm
Engine healthbar segui a tela: https://gmbr.forumeiros.com/engines-f12/engine-para-o-health-seguir-a-tela-t2036.htm
Engine healthbar para o inimigo: https://gmbr.forumeiros.com/engines-f12/engine-health-bar-para-o-inimigo-t2035.htm
O prêmio por uma coisa bem feita é tê-la feito.
o problema é na lateral esquerda e direita da barra! o player sobe em cima da barra sem problemas! mas quando ele colide na lateral da barra ele trava!
flws!
Projetos completos
SUPER MARIO MAZE: https://gmbr.forumeiros.com/galeria-de-projetos-completos-f6/super-mario-maze-101bugs-retirados-t1824.htm
SUPER ARKANOID X: https://gmbr.forumeiros.com/galeria-de-projetos-completos-f6/super-arkanoid-x-versao-atualizada24-01-09-t1889.htm
Projetos em desenvolvimento:
Tankpanzer: 20% Concluído
Robot 27: 20% Concluído
The war of Archer: the escape of the witch: 15% Concluído
Engines:
Engine de pause: https://gmbr.forumeiros.com/engines-f12/engine-de-pause-t2190.htm
Engine healthbar segui a tela: https://gmbr.forumeiros.com/engines-f12/engine-para-o-health-seguir-a-tela-t2036.htm
Engine healthbar para o inimigo: https://gmbr.forumeiros.com/engines-f12/engine-health-bar-para-o-inimigo-t2035.htm
O prêmio por uma coisa bem feita é tê-la feito.
Última edição por Alex FC em Sex 06 Fev 2009, 15:46, editado 1 vez(es)
Re: [RESOLVIDO]''PLAYER TRAVA NA BARRA''
entao coloca isso na colisao:
marca a origem y da barra pra 0 e se a origem y do player for maior que 0, coloca isso na colisa:
- Código:
if (y > other.y) {
vspeed *= -1;
}
marca a origem y da barra pra 0 e se a origem y do player for maior que 0, coloca isso na colisa:
- Código:
if ((y + sprite_yoffset) > other.y) {
vspeed *= -1;
}
Re: [RESOLVIDO]''PLAYER TRAVA NA BARRA''
não deu certo! ai ta meu problema:
FLWS!
Projetos completos
SUPER MARIO MAZE: https://gmbr.forumeiros.com/galeria-de-projetos-completos-f6/super-mario-maze-101bugs-retirados-t1824.htm
SUPER ARKANOID X: https://gmbr.forumeiros.com/galeria-de-projetos-completos-f6/super-arkanoid-x-versao-atualizada24-01-09-t1889.htm
Projetos em desenvolvimento:
Tankpanzer: 20% Concluído
Robot 27: 20% Concluído
The war of Archer: the escape of the witch: 15% Concluído
Engines:
Engine de pause: https://gmbr.forumeiros.com/engines-f12/engine-de-pause-t2190.htm
Engine healthbar segui a tela: https://gmbr.forumeiros.com/engines-f12/engine-para-o-health-seguir-a-tela-t2036.htm
Engine healthbar para o inimigo: https://gmbr.forumeiros.com/engines-f12/engine-health-bar-para-o-inimigo-t2035.htm
O prêmio por uma coisa bem feita é tê-la feito.
FLWS!
Projetos completos
SUPER MARIO MAZE: https://gmbr.forumeiros.com/galeria-de-projetos-completos-f6/super-mario-maze-101bugs-retirados-t1824.htm
SUPER ARKANOID X: https://gmbr.forumeiros.com/galeria-de-projetos-completos-f6/super-arkanoid-x-versao-atualizada24-01-09-t1889.htm
Projetos em desenvolvimento:
Tankpanzer: 20% Concluído
Robot 27: 20% Concluído
The war of Archer: the escape of the witch: 15% Concluído
Engines:
Engine de pause: https://gmbr.forumeiros.com/engines-f12/engine-de-pause-t2190.htm
Engine healthbar segui a tela: https://gmbr.forumeiros.com/engines-f12/engine-para-o-health-seguir-a-tela-t2036.htm
Engine healthbar para o inimigo: https://gmbr.forumeiros.com/engines-f12/engine-health-bar-para-o-inimigo-t2035.htm
O prêmio por uma coisa bem feita é tê-la feito.
Última edição por Alex FC em Sex 06 Fev 2009, 15:46, editado 1 vez(es)
Re: [RESOLVIDO]''PLAYER TRAVA NA BARRA''
cara, fiz , tenta assim:
coloca no objeto player, no evento de colisao com a plataforma:
coloca no objeto player, no evento de colisao com a plataforma:
- Código:
if (y > other.y) {
other.vspeed *= -1;
}
Re: [RESOLVIDO]''PLAYER TRAVA NA BARRA''
não deu certo, ainda ta travando!
FLWS!
Projetos completos
SUPER MARIO MAZE: https://gmbr.forumeiros.com/galeria-de-projetos-completos-f6/super-mario-maze-101bugs-retirados-t1824.htm
SUPER ARKANOID X: https://gmbr.forumeiros.com/galeria-de-projetos-completos-f6/super-arkanoid-x-versao-atualizada24-01-09-t1889.htm
Projetos em desenvolvimento:
Tankpanzer: 20% Concluído
Robot 27: 20% Concluído
The war of Archer: the escape of the witch: 15% Concluído
Engines:
Engine de pause: https://gmbr.forumeiros.com/engines-f12/engine-de-pause-t2190.htm
Engine healthbar segui a tela: https://gmbr.forumeiros.com/engines-f12/engine-para-o-health-seguir-a-tela-t2036.htm
Engine healthbar para o inimigo: https://gmbr.forumeiros.com/engines-f12/engine-health-bar-para-o-inimigo-t2035.htm
O prêmio por uma coisa bem feita é tê-la feito.
FLWS!
Projetos completos
SUPER MARIO MAZE: https://gmbr.forumeiros.com/galeria-de-projetos-completos-f6/super-mario-maze-101bugs-retirados-t1824.htm
SUPER ARKANOID X: https://gmbr.forumeiros.com/galeria-de-projetos-completos-f6/super-arkanoid-x-versao-atualizada24-01-09-t1889.htm
Projetos em desenvolvimento:
Tankpanzer: 20% Concluído
Robot 27: 20% Concluído
The war of Archer: the escape of the witch: 15% Concluído
Engines:
Engine de pause: https://gmbr.forumeiros.com/engines-f12/engine-de-pause-t2190.htm
Engine healthbar segui a tela: https://gmbr.forumeiros.com/engines-f12/engine-para-o-health-seguir-a-tela-t2036.htm
Engine healthbar para o inimigo: https://gmbr.forumeiros.com/engines-f12/engine-health-bar-para-o-inimigo-t2035.htm
O prêmio por uma coisa bem feita é tê-la feito.
Última edição por Alex FC em Sex 06 Fev 2009, 15:47, editado 1 vez(es)
Re: [RESOLVIDO]''PLAYER TRAVA NA BARRA''
humm.. o personagem trava quando encosta na lateral da barra? é isso?
tente assim:
No step coloque:
while place_meeting(x+2,y,barra)
{x-=1;}
while place_meeting(x-2,y,barra)
{x+=1;}
isso vai fazer o jogador, 'sair da barra' caso "entre" nela
Flw..
tente assim:
No step coloque:
while place_meeting(x+2,y,barra)
{x-=1;}
while place_meeting(x-2,y,barra)
{x+=1;}
isso vai fazer o jogador, 'sair da barra' caso "entre" nela
Flw..
Janx- Data de inscrição : 24/05/2008
Reputação : 14
Número de Mensagens : 2417
Prêmios :
x 0 x 0 x 0
x 0 x 2 x 0
x 0 x 0 x 0
Re: [RESOLVIDO]''PLAYER TRAVA NA BARRA''
não mudou nada!
ele não entra na barra só fica emprensado nela quando ele ta na direção oposta da barra!
eu quero q quando o player batesse na lateral da barra, a barra fosse para direção contraria!
FLWS!
Projetos completos
SUPER MARIO MAZE: https://gmbr.forumeiros.com/galeria-de-projetos-completos-f6/super-mario-maze-101bugs-retirados-t1824.htm
SUPER ARKANOID X: https://gmbr.forumeiros.com/galeria-de-projetos-completos-f6/super-arkanoid-x-versao-atualizada24-01-09-t1889.htm
Projetos em desenvolvimento:
Tankpanzer: 20% Concluído
Robot 27: 20% Concluído
The war of Archer: the escape of the witch: 15% Concluído
Engines:
Engine de pause: https://gmbr.forumeiros.com/engines-f12/engine-de-pause-t2190.htm
Engine healthbar segui a tela: https://gmbr.forumeiros.com/engines-f12/engine-para-o-health-seguir-a-tela-t2036.htm
Engine healthbar para o inimigo: https://gmbr.forumeiros.com/engines-f12/engine-health-bar-para-o-inimigo-t2035.htm
O prêmio por uma coisa bem feita é tê-la feito.
ele não entra na barra só fica emprensado nela quando ele ta na direção oposta da barra!
eu quero q quando o player batesse na lateral da barra, a barra fosse para direção contraria!
FLWS!
Projetos completos
SUPER MARIO MAZE: https://gmbr.forumeiros.com/galeria-de-projetos-completos-f6/super-mario-maze-101bugs-retirados-t1824.htm
SUPER ARKANOID X: https://gmbr.forumeiros.com/galeria-de-projetos-completos-f6/super-arkanoid-x-versao-atualizada24-01-09-t1889.htm
Projetos em desenvolvimento:
Tankpanzer: 20% Concluído
Robot 27: 20% Concluído
The war of Archer: the escape of the witch: 15% Concluído
Engines:
Engine de pause: https://gmbr.forumeiros.com/engines-f12/engine-de-pause-t2190.htm
Engine healthbar segui a tela: https://gmbr.forumeiros.com/engines-f12/engine-para-o-health-seguir-a-tela-t2036.htm
Engine healthbar para o inimigo: https://gmbr.forumeiros.com/engines-f12/engine-health-bar-para-o-inimigo-t2035.htm
O prêmio por uma coisa bem feita é tê-la feito.
Última edição por Alex FC em Sex 06 Fev 2009, 15:48, editado 1 vez(es)
Re: [RESOLVIDO]''PLAYER TRAVA NA BARRA''
a! se quer inverter a direçao da barra?
intao no evento de colisao da barra com o player
coloque
intao no evento de colisao da barra com o player
coloque
- Código:
hspeed = -hspeed
x += hspeed
Janx- Data de inscrição : 24/05/2008
Reputação : 14
Número de Mensagens : 2417
Prêmios :
x 0 x 0 x 0
x 0 x 2 x 0
x 0 x 0 x 0
Re: [RESOLVIDO]''PLAYER TRAVA NA BARRA''
ESSA BARRA TAMBEM É USADA PARA O PLAYER IR DE UM LUGAR PARA O OUTRO!
SE EU UTILIZAR ESSE CÓDIGO , TODA VEZ Q O PLAYER PULAR EM CIMA DA BARRA ELA VAI NA DIREÇÃO CONTRARIA! E EU SÓ QUERO Q ACONTEÇA ISSO SOMENTE QUANDO COLEDIR NA LATERAL ESQUERDA E DIREITA DA BARRA!
PROBLEMA:
FLWS!
Projetos completos
SUPER MARIO MAZE: https://gmbr.forumeiros.com/galeria-de-projetos-completos-f6/super-mario-maze-101bugs-retirados-t1824.htm
SUPER ARKANOID X: https://gmbr.forumeiros.com/galeria-de-projetos-completos-f6/super-arkanoid-x-versao-atualizada24-01-09-t1889.htm
Projetos em desenvolvimento:
Tankpanzer: 20% Concluído
Robot 27: 20% Concluído
The war of Archer: the escape of the witch: 15% Concluído
Engines:
Engine de pause: https://gmbr.forumeiros.com/engines-f12/engine-de-pause-t2190.htm
Engine healthbar segui a tela: https://gmbr.forumeiros.com/engines-f12/engine-para-o-health-seguir-a-tela-t2036.htm
Engine healthbar para o inimigo: https://gmbr.forumeiros.com/engines-f12/engine-health-bar-para-o-inimigo-t2035.htm
O prêmio por uma coisa bem feita é tê-la feito.
Última edição por Alex FC em Sex 06 Fev 2009, 15:48, editado 1 vez(es)
Re: [RESOLVIDO]''PLAYER TRAVA NA BARRA''
A certo, tente assim:
colisao do player com a barra:
if place_meeting(x+2,y,other) && y+(sprite_height-sprite_get_yoffset(sprite_index) ) >other.y
{other.hspeed = -hspeed;}
if place_meeting(x-2,y,other) && y+(sprite_height-sprite_get_yoffset(sprite_index) ) >other.y
{other.hspeed = -hspeed;}
Bom, acredito que assim funcione.
Flw!
colisao do player com a barra:
if place_meeting(x+2,y,other) && y+(sprite_height-sprite_get_yoffset(sprite_index) ) >other.y
{other.hspeed = -hspeed;}
if place_meeting(x-2,y,other) && y+(sprite_height-sprite_get_yoffset(sprite_index) ) >other.y
{other.hspeed = -hspeed;}
Bom, acredito que assim funcione.
Flw!
Janx- Data de inscrição : 24/05/2008
Reputação : 14
Número de Mensagens : 2417
Prêmios :
x 0 x 0 x 0
x 0 x 2 x 0
x 0 x 0 x 0
Re: [RESOLVIDO]''PLAYER TRAVA NA BARRA''
não deu certo! o player não trava na barra só q a barra fica parada!
mas descobri um jeito diferente!É assim:
No evento step da barra:
na aba control:
check empty:
x:3
y:0
Objects: All.
Relative.
depois na aba move:
reverse horizontal direction.
na aba control:
check empty:
x:-3
y:0
Objects: All.
Relative.
depois na aba move:
reverse horizontal direction.
Obrigado pela ajuda!
FLWS!
Projetos completos
SUPER MARIO MAZE: https://gmbr.forumeiros.com/galeria-de-projetos-completos-f6/super-mario-maze-101bugs-retirados-t1824.htm
SUPER ARKANOID X: https://gmbr.forumeiros.com/galeria-de-projetos-completos-f6/super-arkanoid-x-versao-atualizada24-01-09-t1889.htm
Projetos em desenvolvimento:
Tankpanzer: 20% Concluído
Robot 27: 20% Concluído
The war of Archer: the escape of the witch: 15% Concluído
Engines:
Engine de pause: https://gmbr.forumeiros.com/engines-f12/engine-de-pause-t2190.htm
Engine healthbar segui a tela: https://gmbr.forumeiros.com/engines-f12/engine-para-o-health-seguir-a-tela-t2036.htm
Engine healthbar para o inimigo: https://gmbr.forumeiros.com/engines-f12/engine-health-bar-para-o-inimigo-t2035.htm
O prêmio por uma coisa bem feita é tê-la feito.
mas descobri um jeito diferente!É assim:
No evento step da barra:
na aba control:
check empty:
x:3
y:0
Objects: All.
Relative.
depois na aba move:
reverse horizontal direction.
na aba control:
check empty:
x:-3
y:0
Objects: All.
Relative.
depois na aba move:
reverse horizontal direction.
Obrigado pela ajuda!
FLWS!
Projetos completos
SUPER MARIO MAZE: https://gmbr.forumeiros.com/galeria-de-projetos-completos-f6/super-mario-maze-101bugs-retirados-t1824.htm
SUPER ARKANOID X: https://gmbr.forumeiros.com/galeria-de-projetos-completos-f6/super-arkanoid-x-versao-atualizada24-01-09-t1889.htm
Projetos em desenvolvimento:
Tankpanzer: 20% Concluído
Robot 27: 20% Concluído
The war of Archer: the escape of the witch: 15% Concluído
Engines:
Engine de pause: https://gmbr.forumeiros.com/engines-f12/engine-de-pause-t2190.htm
Engine healthbar segui a tela: https://gmbr.forumeiros.com/engines-f12/engine-para-o-health-seguir-a-tela-t2036.htm
Engine healthbar para o inimigo: https://gmbr.forumeiros.com/engines-f12/engine-health-bar-para-o-inimigo-t2035.htm
O prêmio por uma coisa bem feita é tê-la feito.
Página 1 de 1
Permissões neste sub-fórum
Não podes responder a tópicos
|
|