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 - nightmarer

#1
Hello, I tried to open my project with this version and I got the following error.

https://imgur.com/vJpzMms
https://imgur.com/rJtGzU3

Error: El intervalo solicitado se extiende más allá del final de la matriz.
(This means: the interval requested is extended beyond the end of the array).
Version: AGS 3.99.107.0

System.ArgumentOutOfRangeException: El intervalo solicitado se extiende más allá del final de la matriz.
   en System.Runtime.InteropServices.Marshal.CopyToNative(Object source, Int32 startIndex, IntPtr destination, Int32 length)
   en AGS.Editor.BitmapExtensions.SetRawData(Bitmap bmp, Byte[] rawData, PixelFormat pixelFormat)
   en AGS.Editor.ObjectsEditorFilter.Paint(Graphics graphics, RoomEditorState state)
   en AGS.Editor.RoomSettingsEditor.bufferedPanel1_Paint(Object sender, PaintEventArgs e)
   en System.Windows.Forms.Control.OnPaint(PaintEventArgs e)
   en System.Windows.Forms.Control.PaintWithErrorHandling(PaintEventArgs e, Int16 layer)
   en System.Windows.Forms.Control.WmPaint(Message& m)
   en System.Windows.Forms.Control.WndProc(Message& m)
   en System.Windows.Forms.ScrollableControl.WndProc(Message& m)
   en System.Windows.Forms.Control.ControlNativeWindow.OnMessage(Message& m)
   en System.Windows.Forms.Control.ControlNativeWindow.WndProc(Message& m)
   en System.Windows.Forms.NativeWindow.Callback(IntPtr hWnd, Int32 msg, IntPtr wparam, IntPtr lparam)
#2
Great work! Great improvement the Deflate compression.
#3
Quote from: Crimson Wizard on Wed 07/06/2023 20:54:38Which exact behavior do you want to get?
I want my character to have the standard view while he speaks, but without movement.

Quote from: Crimson Wizard on Wed 07/06/2023 20:54:38If you want to have no speech animation at all, then set SpeechView to 0.
I have just tried and I get this error: SetCharacterView: invalid view number
#4
Hello, I have in my game SierraWithBackgorund as Speech style in my general settings.
But there are sometimes which I prefer not showing the mugshots.
So I'm using
Speech.Style = eSpeechLucasarts;
in my script.
The first problem is that whenever the character speaks it turns in the mugshot, as the SpeechView is still the mugshot. Then I change the SpeechView to the standard view of the caracter, and then whenever the character speaks it does the walking movement.
How can I deal with this problem?

Regards.
#5
Hello,

after the NullPointer error was solved and reviewing the error with Crimson Wizard, the problem of the sound not being played was caused by the audio channels assignation exceeded the requirements of 3.5.1 version.

Thank you very much for your help.
#6
Quote from: Khris on Sat 28/01/2023 13:28:42The propagandaPlay function will call .Play() two times if the channel pointer is null.
Also, if the 2nd play command fails and the pointer ends up being null, you're calling SetRoomLocation on null, again causing a null pointer error.

I'd do this:

Code: ags
function propagandaPlay() {
  if(acPropaganda == null) acPropaganda = aSpeech_close.Play();
  if(acPropaganda != null) acPropaganda.SetRoomLocation(866, 252);
  SetTimer(1, 1200);
}
Thank you, but I'm afraid I have already tried that before. If I do that then the second time I visit the room the audio is not being played.
#7
Quote from: Crimson Wizard on Mon 23/01/2023 23:29:58Is the question currently why do you need to check for null at all, or why Play returns null in that particular case?
I was checking for null just for debugging, as I was getting a NullPointerException I just wanted to know if the AudioChannel is null before playing it.

Quote from: Crimson Wizard on Mon 23/01/2023 23:29:58I answered the first question, but I cannot answer the second without knowing more details about your game's audio, and particular circumstances.

These are all the code lines related to this AudioChannel.
Code: ags
AudioChannel *acPropaganda;

function propagandaPlay() {
  if(acPropaganda == null) {
    Display("Is null");
    acPropaganda = aSpeech_close.Play();
  } 
  if(acPropaganda != null) {
    Display("Is not null");
    acPropaganda = aSpeech_close.Play();
    acPropaganda.SetRoomLocation(866, 252);
  }
  SetTimer(1, 1200);
}

function room_AfterFadeIn(){
    propagandaPlay();
}

function room_RepExec() {
  
  if(IsTimerExpired(1)) { //SPEECH
    if(!acPropaganda.IsPlaying) {
      propagandaPlay();
    }
    SetTimer(1, 1200);  
  }
}

function room_Leave(){
  if(acPropaganda.IsPlaying && acPropaganda != null) {
    acPropaganda.Stop();
  }
}

Do you need to know something else?
#8
Hello.
Quote from: Crimson Wizard on Mon 23/01/2023 11:45:17- sound driver is not initialized;
The rest of the room sounds are there being played.

Quote from: Crimson Wizard on Mon 23/01/2023 11:45:17- sound is stored in audio.vox, and audio.vox is missing;
- engine failed to start the playback, because of unsupported format or another problem;
The audio clip is being played the first time the character enters in the room.
Quote from: Crimson Wizard on Mon 23/01/2023 11:45:17- could not find a spare audio channel, and other running sounds have higher priority.
There are the same number of audio files played than the first time the character visits the room.
#9
But why I need to use this "if" if I am playing that sound in the previous line?
Why is this pointer null, then?
#10
Hello.

I am having a Null Pointer Exception with an Audio Channel set in one room, but it happens the second time I visit the room.

Code: ags
AudioChannel *acPropaganda;

function room_Load() {
 acPropaganda = aSpeech_close.Play();
 acPropaganda.SetRoomLocation(866, 252);
}

function room_Leave(){//Always exit from Station Out
 if(acPropaganda.IsPlaying) {
    acPropaganda.Stop();
 }
}

The SetRoomLocation line is the one which is returning the error, I tried using
Code: ags
function room_Load() {
 acPropaganda = aSpeech_close.Play();
 if (acPropaganda == null) 
  acPropaganda.SetRoomLocation(866, 252);
}
but then I'm having the Null Pointer Exception in the if.
I don't know what I'm doing wrong.
#11
OMG. You were right. There was a function in the repeat_execute_always which was guiding to the function created for the walking sound. There it was an if going to back to the standard character view if it wasn't the standard view.
I don't know why it didn't jump this while debugging.
Thank you!
#12
Well, I just created a new view (585) with exactly the same sprites and now it is working. I don't know why it was not working with the 583. As a test I have deleted the 583 and created back again and it doesn't work again. It seems that this view number is not working, at least in my project.
#13
Quote from: Cassiebsg on Wed 11/01/2023 21:12:11Can you post the entire code in that function?
Maybe you changing it back in another function, or before the function ends?

Are you sure that you have the correct sprites assigned to the view?
I know, stupid question, but happened to me once that my character wasn't changing it's view, and after a long time trying to debug it, I found out that it was changing, there was just a wrong sprite in the view, and it was (by "luck") showing that exact sprite.

Another test you can do, is select another view that is completely different (any view, even if you transform Isaac into a blue cup - just make sure all loops are there and have at least 1 sprite.

Also, are you sure you are are looking at Isaac and not another character that looks exactly like him? (seen that happen as well)

(and now I can't stop thinking about The Love Boat...)  :-[  (laugh)
Thank you. It seems to work with every view instead this one, and the sprites are fine. I'll try to create the complete view again to see if this solves the problem.
#14
Quote from: Crimson Wizard on Wed 11/01/2023 16:15:06
Quote from: nightmarer on Wed 11/01/2023 16:03:45I am wondering if the engine gives some troubles when having more than x views in the game.

Does it work with any random view, like view 1, 2 etc?
Is it absolutely certain that view 583 does exist?
Sorry for stupid questions, I had to be sure.

Code: ags
Isaac.ChangeView(PLAYERVIEW);
Yes, the 583 exits. I tried to change the number of view and it works with any number, with the 100, 500, 582, even the 584. I'm going to delete the view and create it again to see if it is solved.
I will update you.

Quote from: Crimson Wizard on Wed 11/01/2023 16:15:06
Quote from: nightmarer on Wed 11/01/2023 16:03:45I am wondering if the engine gives some troubles when having more than x views in the game.

BTW, I just wanted to mention, that you don't have to use raw numbers. For each View AGS generates a constant, which name corresponds to view's name in capital letters. For example, if your view is called PlayerView, then it will be PLAYERVIEW, and you can do:

Code: ags
Isaac.ChangeView(PLAYERVIEW);
Oh! I didn't know that. Intead of that I was written myself constants with it. Thank you!
#15
Quote from: Crimson Wizard on Wed 11/01/2023 00:54:15Please tell, in which situation do you call this? What function; and are there any other view-related commands around these lines?

What happens if you use same command elsewhere, for instance, in game_start, or when starting some room which is easy to test, in "before fade-in" event?
Hello Crimson Wizard.
This ChangeView is triggered from the GlobalScript as it is something that can run in every room.
But I have just tried to do it in a Load function in a room and it is not working.
I am wondering if the engine gives some troubles when having more than x views in the game.
#16
Quote from: Khris on Wed 11/01/2023 07:31:17Yeah, in case you animated the character beforehand, don't forget to unlock the view again.
Code: ags
  Isaac.UnlockView();
Hello Khris.
It is not the case, because the view is not locked, anyway I tried to do previously and it doesn't work.
#17
Hello,

I've been trying to make my character to change the view but it is not doing it.

Code: ags
    Isaac.ChangeView(583);
    Display("%d", Isaac.View);

The display it shows the number 583 rightly, but it is showing the normal view of the character. The view 583 is showing other sprites.

I think that this is a kind of bug.

I'm still using the 3.5.1 and the last patch, by the way.
#18
Hello all.

Seems that the download link is broken.
Is anybody available to provide me the module?

Regards.
#19
Ok, I've already seen that there's another threads opened for this thopic.

I apologize.
#20
Hello everybody.

I see no recent updates in this post. Does anybody know anything about the development of these new engines?

Regards.
SMF spam blocked by CleanTalk