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

Topics - tkitez

#1
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. 
#2
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?
#3
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