Autor |
Mensagem |
Matheus Dantas
Usuário


Registrado: 23/04/13 Mensagens: 249 Localização: São Paulo, Mogi das Cruzes |
|
|
Sex Out 03, 2014 11:41 pm |
 |
 |
Matheus Dantas
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
 |  | //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 |
 |
 |
Lima
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 |
 |
 |
Matheus Dantas
Usuário


Registrado: 23/04/13 Mensagens: 249 Localização: São Paulo, Mogi das Cruzes |
|
|
Sex Nov 14, 2014 4:35 pm |
 |
 |
Lima
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 |
 |
 |
welgomes
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 |
 |
 |
Lima
Usuário


Registrado: 16/11/13 Mensagens: 100
|
|
|
|
isso mesmo! valeu cara! sua sugestão foi perfeita! vou fazer isso.
|
|
Sex Nov 14, 2014 8:08 pm |
 |
 |
Matheus Dantas
Usuário


Registrado: 23/04/13 Mensagens: 249 Localização: São Paulo, Mogi das Cruzes |
|
|
Sáb Nov 15, 2014 12:47 am |
 |
 |
|