Menu

Show posts

This section allows you to view all posts made by this member. Note that you can only see posts made in areas you currently have access to.

Show posts Menu

Messages - PERXEO

#1
Thanks for the answer ... ill'l try to do it!!
#2
I want to make a cutscene animation, in which my character uses a skateboard to go from one side of a room to the other. During this movement (that I'm going to do with programming as you can see in my snippet of code), I want a view to be shown in which the character goes "swinging his arms" as if he were surfing. In a repeatedly_executed I have created this function
Code: ags
 int frame=0;
  if(GamePerxeo.SkatingActive)
  {
    player.UnlockView();
    //player.ChangeView(8);
    player.LockView(8);
    frame+=1;
    //player.Animate(8, 0);
    if(frame>=24)
    {
      frame=0;
    }
    player.Frame=frame;
    posPlayerx+=10;
    player.x=posPlayerx;
    skate.Visible=true;

view 8 is the view where the player is over the skateboard in a loop waving their arms.
skate is an object with represents the skateboard.

With the previous code the player is moving from a side to the other but only shows the firts frame of the view. I want to show all the frames of this view in a loop...until my player comes to the end.

Thanks for your help!!
#3
Oh thanks!! Il'l try it!!
#4
Beginners' Technical Questions / Reset a TIMER
Wed 24/05/2023 15:08:01
I see that in AGS there are only two functions (as far as I know), which have to do with TIMER. One is
Code: ags
SetTimer(int timer_id, int timeout)
and the other is
Code: ags
bool IsTimerExpired(int timer_id)
.
However, I would like to know how to override a SetTimer once it has started, ie something like StopTimer or ResetTimer. In any case, how do you cancel a timer so that it starts again from zero?
#5
oh thanks! I solved it!!
#6
I'd like to make a timer so that only when the player is standing still for a series of cycles, it could trigger a nice action like saying something, or scratching or looking at the clock. Something like
Code: ags
if(!player.Moving)
  {
     SetTimer(1,10000);
     if (IsTimerExpired(1)) 
     {
       player.Say("I'm getting bored");
        ,,,,any other action....
     }
  }

but I don't know where to place it and how to make it work correctly...
#7
Thanks!!! I'm going to try it....
#8
Hi everyone! I've a snippet of code similar to this
Code: ags
 PuzzleD.rows[0]=getRow(0);
    PuzzleD.columns[0]=getColumn(0);
    piece0.X=posxInitial+(PuzzleD.columns[0]*witdh);
    piece0.Y=posyInitial+(PuzzleD.rows[0]*height);

 PuzzleD.rows[1]=getRow(1);
    PuzzleD.columns[1]=getColumn(1);
    piece1.X=posxInitial+(PuzzleD.columns[1]*witdh);
    piece1.Y=posyInitial+(PuzzleD.rows[1]*height);

 PuzzleD.rows[2]=getRow(2);
    PuzzleD.columns[2]=getColumn(2);
    piece2.X=posxInitial+(PuzzleD.columns[2]*witdh);
    piece2.Y=posyInitial+(PuzzleD.rows[2]*height);
.........................................
 PuzzleD.rows[n]=getRow(n);
    PuzzleD.columns[n]=getColumn(n);
    piecen.X=posxInitial+(PuzzleD.columns[n]*witdh);
    piecen.Y=posyInitial+(PuzzleD.rows[n]*height)


I want to resume this in an unique loop like this

Code: ags
 for(int i=0;i<=N;i++)
    {
        PuzzleD.rows[i]=getRow(i);
        PuzzleD.columns[i]=getColumn(i);
        "piece"+i.X=posxInitial+(PuzzleD.columns[i]*witdh);
       "piece"+i.Y=posyInitial+(PuzzleD.rows[i]*height);
}

but I don't know exactly how to do it. Piece1, piece2, piece3, .... pìeceN, are objects on a room, but I don`t have any idea how to parse it... thanks for your help!!!
#9
Thanks, that's the reason I've not found it....
#10
What functions, methods and properties does AGS have for handling arrays, and where is the glossary where I can find these elements?
In some sample code that has fallen into my hands, I have been able to see functions like lerp, but... I can't find them in the official manual.
#11
Thank you very much!! I have to rethink this, because you are absolutely right. There are inconsistencies between the dialogs and the trs file....you can't imagine how long I've been looking at this. Thanks for your time!!!
#12
QuoteDid you edit the key lines in TRS yourself?
No...but I changed the lines on the dialog, as you can see on the first image i posted....
#13
QuoteSomething that I find strange in your example, if you already have Spanish in the game itself, then why do you need a separate Spanish translation?

Good question...maybe this is part of the problem. But if I have to refer to spanish language and this is the default idiom...how must I refer to it?
Something like that???

Game.ChangeTranslation("dafault");
    translation = "default";
    Game.ChangeSpeechVox("default");
    player.Say("A partir de ahora, todo será en Español");
    gControl.Visible=false;
#14
My default language is spanish in the game.
#15
Of course... here is:
#16
Hi CRIMSOM!
Thanks for your answer. I refer to this kind of dialogs



When I change the idiom with the previous code, those dialogs don't change from spanish to english, but the document english.trs it's ok (or at least I think so)
#17
Hi everyone!!
I have another small problem with translations and audios in other languages.
I have these two codes, associated with two buttons for the English and Spanish language in the status bar. They are to change languages ��during the game.

Code: ags
function btnSpanish_OnClick(GUIControl *control, MouseButton button)
{
    Game.ChangeTranslation("Spanish");
    translation = "Spanish";
    Game.ChangeSpeechVox("Spanish");
    player.Say("A partir de ahora, todo será en Español");
    gControl.Visible=false;
    
}

function btnEnglish_OnClick(GUIControl *control, MouseButton button)
{
    Game.ChangeTranslation("Ingles");
    translation = "Ingles";
    Game.ChangeSpeechVox("Ingles");
    player.Say("From now on, everything will be in English");
    gControl.Visible=false;
}

Everything works "quite" well except that the dialogues do not change to English when I activate English as the language. However, all the rest of the texts, descriptions, player.Say("xxxx")...etc work perfectly. I have followed all the steps that come in the tutorial but no matter how much I compile over and over again and check the .trs files I can't find the solution.

Should I do something else, for the dialogs to change to the chosen language?
#18
Sorry, I was trying to find the vox files, in the main game directories, without having compiled the game. I didn't know that they would only be found when the game was compiled and we created an exe. Now you have made it clear to me. Thank you!!
#19
I'm making progress in a game, and now I'm on the subject of voice translations.
I've created some subdirectories nested inside the "Speech" folder. One of this is "Spanish" and the other is "English". Inside I've put some audio files with the XXXXY.EXT way to name those things as explained on the tutorial.

I can see on tutorial that:

QuoteFor example, if you have this folder structure in your game project:

Speech

Francais

MyLang
then the editor will create following voxes:

speech.vox (with files only from the root "Speech" folder);
sp_francais.vox (with files from "Speech/Francais");
sp_mylang.vox (with files from "Speech/MyLang");

What I don't know is, where are these voxes created? (I do not see them)
When I tried to change language, with

Code: ags
Game.ChangeTranslation("Spanish") == true;
    translation = Game.TranslationFilename;
    Game.ChangeSpeechVox("Spanish");

the translation of dialogs and text is correct, but the change to the audio language doesn't work properly. I think this is because the voxes files are not created, but I don't know how to do it...

#20
Thanks for the idea!! And for the two great explanations!!! Perfect as always!!
SMF spam blocked by CleanTalk