Após uma Animação

 
   3D Game Builder - Índice » Programação
Após uma Animação
Autor Mensagem
Matheus Dantas
Usuário
Usuário


Registrado: 23/04/13
Mensagens: 249
Localização: São Paulo, Mogi das Cruzes

Após uma Animação
Existe possibilidade de executar uma função apenas quando a animação terminar, mas sem ela repetir mesmo em Loop ou PlayOnce?



_________________
//Contato

YouTube:
https://www.youtube.com/channel/UCCBpgDU7UrI1V8YvoKg86QA

Wordpress (Projetos):
http://dantasgames.wordpress.com/

Page(Facebook):
https://www.facebook.com/mathdantasgames

Deviantart:
http://dantasgames.deviantart.com/

Profile(Facebook):
https://www.facebook.com/matheus.dantas.1000

Instagram:
matheusdantassantana

Twitter:
@MatheusDantasDG
Sex Out 03, 2014 11:41 pm Exibir perfil de usuários
Matheus Dantas
Usuário
Usuário


Registrado: 23/04/13
Mensagens: 249
Localização: São Paulo, Mogi das Cruzes

Foi mal
Acabei criando as solução sem querer... Mas obrigado mesmo assim

Código:
//Botão A
if iskeypress(65) = false then
begin
WriteGlobalVar('atk_time',0);
end;

if iskeypress(65) = true then
begin
WriteGlobalVar('atk_time', ReadGlobalVar('atk_time')+1);
if ReadGlobalVar('atk_time') = 1 then                                                       
begin
loadmainactorweapon('Chute');
SetObjectAnimationMode('MainActor', 'Loop');
end;

if ReadGlobalVar('atk_time') = 50 then                                                       
begin
SetObjectAnimationMode('MainActor', 'PlayOnce');
end;

if ReadGlobalVar('atk_time') = 100 then                                                       
begin
loadmainactorweapon('Sem Arma');
SetObjectAnimationMode('MainActor', 'Loop');
end;
end;
//

//Botão S
if iskeypress(83) = false then
begin
WriteGlobalVar('atk_time2',0);
end;

if iskeypress(83) = true then
begin
WriteGlobalVar('atk_time2', ReadGlobalVar('atk_time2')+1);
if ReadGlobalVar('atk_time2') = 1 then                                                       
begin
loadmainactorweapon('Soco');
SetObjectAnimationMode('MainActor', 'Loop');
end;

if ReadGlobalVar('atk_time2') = 50 then                                                       
begin
SetObjectAnimationMode('MainActor', 'PlayOnce');
end;

if ReadGlobalVar('atk_time2') = 200 then                                                       
begin
loadmainactorweapon('Sem Arma');
SetObjectAnimationMode('MainActor', 'Loop');
end;
end;
//
/////////////////////////////////////////////////////////////////////////////

if ReadGlobalVar('atk_time') > 1 then                                                       
begin
//
if iskeypress(38) = true then
begin
SetObjectAnimationMode('MainActor', 'PlayOnce');
end;
if iskeypress(40) = true then
begin
SetObjectAnimationMode('MainActor', 'PlayOnce');
end;
if iskeypress(37) = true then
begin
SetObjectAnimationMode('MainActor', 'PlayOnce');
end;
if iskeypress(39) = true then
begin
SetObjectAnimationMode('MainActor', 'PlayOnce');
end;
//
end;


//


//
if ReadGlobalVar('atk_time2') > 1 then                                                       
begin
//
if iskeypress(38) = true then
begin
SetObjectAnimationMode('MainActor', 'PlayOnce');
end;
if iskeypress(40) = true then
begin
SetObjectAnimationMode('MainActor', 'PlayOnce');
end;
if iskeypress(37) = true then
begin
SetObjectAnimationMode('MainActor', 'PlayOnce');
end;
if iskeypress(39) = true then
begin
SetObjectAnimationMode('MainActor', 'PlayOnce');
end;
//
end;




/////////////////////////////////////////////////////
if ReadGlobalVar('atk_time') > 100 then                                                       
begin
if iskeypress(38) and iskeypress(38) then
begin
//
if iskeypress(38) = true then
begin
SetObjectAnimationMode('MainActor', 'Loop');
end;
if iskeypress(40) = true then
begin
SetObjectAnimationMode('MainActor', 'Loop');
end;
if iskeypress(37) = true then
begin
SetObjectAnimationMode('MainActor', 'Loop');
end;
if iskeypress(39) = true then
begin
SetObjectAnimationMode('MainActor', 'Loop');
end;
//
end;
//
end;
////////////////////////////////////////////////////
if ReadGlobalVar('atk_time2') > 200 then                                                       
begin
if iskeypress(38) and iskeypress(38) then
begin
//
if iskeypress(38) = true then
begin
SetObjectAnimationMode('MainActor', 'Loop');
end;
if iskeypress(40) = true then
begin
SetObjectAnimationMode('MainActor', 'Loop');
end;
if iskeypress(37) = true then
begin
SetObjectAnimationMode('MainActor', 'Loop');
end;
if iskeypress(39) = true then
begin
SetObjectAnimationMode('MainActor', 'Loop');
end;
//
end;
//
end;
////////////////////////////////////////////////////


_________________
//Contato

YouTube:
https://www.youtube.com/channel/UCCBpgDU7UrI1V8YvoKg86QA

Wordpress (Projetos):
http://dantasgames.wordpress.com/

Page(Facebook):
https://www.facebook.com/mathdantasgames

Deviantart:
http://dantasgames.deviantart.com/

Profile(Facebook):
https://www.facebook.com/matheus.dantas.1000

Instagram:
matheusdantassantana

Twitter:
@MatheusDantasDG
Sáb Out 04, 2014 12:48 am Exibir perfil de usuários
Lima
Usuário
Usuário


Registrado: 16/11/13
Mensagens: 100

Acho que entendi.. a variável atk-time aumenta de 0 á 50 se você pressiona um botão, e esse é justamente o tempo que a animação demora para acabar, é isso?
Sex Nov 14, 2014 11:47 am Exibir perfil de usuários
Matheus Dantas
Usuário
Usuário


Registrado: 23/04/13
Mensagens: 249
Localização: São Paulo, Mogi das Cruzes

mais ou menos, é meio velho isso, é de um projeto que perdi



_________________
//Contato

YouTube:
https://www.youtube.com/channel/UCCBpgDU7UrI1V8YvoKg86QA

Wordpress (Projetos):
http://dantasgames.wordpress.com/

Page(Facebook):
https://www.facebook.com/mathdantasgames

Deviantart:
http://dantasgames.deviantart.com/

Profile(Facebook):
https://www.facebook.com/matheus.dantas.1000

Instagram:
matheusdantassantana

Twitter:
@MatheusDantasDG
Sex Nov 14, 2014 4:35 pm Exibir perfil de usuários
Lima
Usuário
Usuário


Registrado: 16/11/13
Mensagens: 100

Eu fiz um parecido há um tempo atrás! mas ele só funcionava em computadores com placa OnBoard, (o meu ainda é), o loop é mais lento nesses computadores!
Sex Nov 14, 2014 6:57 pm Exibir perfil de usuários
welgomes
Usuário
Usuário


Registrado: 10/07/11
Mensagens: 827
Localização: São Paulo - Capital

Usa o tempo do PC assim como aqueles exemplos: mostrar mensagem por 5 segundos ou mostrar imagem por 5 segundos.
Desta forma não depende da velocidade do computador.


Sex Nov 14, 2014 7:30 pm Exibir perfil de usuários
Lima
Usuário
Usuário


Registrado: 16/11/13
Mensagens: 100

Very Happy Very Happy isso mesmo! valeu cara! sua sugestão foi perfeita! vou fazer isso.
Sex Nov 14, 2014 8:08 pm Exibir perfil de usuários
Matheus Dantas
Usuário
Usuário


Registrado: 23/04/13
Mensagens: 249
Localização: São Paulo, Mogi das Cruzes

O sistema de segundos é bom porque mesmo se o pc estiver lento, a variável não vai durar absurdamente

_________________
//Contato

YouTube:
https://www.youtube.com/channel/UCCBpgDU7UrI1V8YvoKg86QA

Wordpress (Projetos):
http://dantasgames.wordpress.com/

Page(Facebook):
https://www.facebook.com/mathdantasgames

Deviantart:
http://dantasgames.deviantart.com/

Profile(Facebook):
https://www.facebook.com/matheus.dantas.1000

Instagram:
matheusdantassantana

Twitter:
@MatheusDantasDG
Sáb Nov 15, 2014 12:47 am Exibir perfil de usuários
   3D Game Builder - Índice » Programação
Página 1 de 1