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

#1
WONDERFUL!!  Your suggestion to put in Wait(1) in the dialog_request function worked perfectly.  Thanks so much...hard to find something like that in the faq or forums.


EDIT by Ashen: No need to quote the entire post just above yours. And you're welcome.
#2
Quote from: Ashen on Sun 05/08/2007 15:09:17
Which frame do you see - is it reliably different (always the same 'wrong' frame for each number), or does it choose at random? The obvious things to check are that you've imported the frames in the right order and that you're not choosing, for example, frame 1 when you actually want frame 0. (Frame 0 is the one you see in the Room editor, 1-3 are the ones you import in the 'Animating backgrounds' window.)
The frames themselves are imported correctly, which I verified by testing without the script and just watched the animations appear in the proper sequence.  It appears to be a different wrong sequence depending on which option I choose first, but I get that same wrong sequence every time I restart the game and pick the same option. For example:
   Option Sequence          Shows Background
           3                                        1
           2                                         3
           1                                         2
           1                                         1
           2                                         1
           3                                         2

By option sequence, I mean I chose those in order (3,2,1,1,2,3).  If I start instead
with choosing 2, the sequence 2,3,1 shows 1,2,3.
#3
In an animating room with 3 background animations, I have an interaction for
when player enters room (after fadein) that runs this dialog script

// dialog script file
@S  // dialog startup entry point
@1  // option 1
run-script 1
return
@2  // option 2
run-script 2
return
@3  // option 3
run-script 3
return
@4  // option 4
run-script 4
stop

In the global script I have
#sectionstart dialog_request //
function dialog_request(int parameter)
{
// 0 not a valid parameter
  if (parameter==1) {
      SetBackgroundFrame(1);
       //  SetBackgroundFrame(GetBackgroundFrame()+1);

     }
  if (parameter==2) {SetBackgroundFrame(2);}
  if (parameter==3) {SetBackgroundFrame(3);}
  if (parameter==4) {SetBackgroundFrame(0);}
}
#sectionend dialog_request//

Everything compiles and runs, but the only option that works correctly is #4.  The others all change the background, but never to the appropriate frame number.  For example, If I chose option 1, I pass a "1" to the dialog_request, and so expect to see background #1, but instead I will get something different. 
#4
I get a compiler error (invalid parameter) if I use 0 as the parameter for
run-script.  I have a test in my global script (in dialog_request) for values
0 through 4.  If I simply change
run-script 0  to run-script 4 the compiler is happy.  Is zero not allowed?
#5
It appears that the room editor modifies my graphic from 640x360 to 640x400 when I import it.  However, when I try to load via background animation another 640x360 graphic, I get an error message saying the background animation is 640x360 (which it actually is) and doesn't match the room background.  Consequently, I can't load any background animation graphics, even though every graphic I have is exactly the same size.  This happens with both .bmp and .pcx.  I've tried with game resolution at 640x480 and at 640x400, but the same thing happens.
SMF spam blocked by CleanTalk