Problems with functions (again)

Started by Akumayo, Mon 13/06/2005 01:15:30

Previous topic - Next topic

Akumayo

In one of my function scripts I have :

function enemy_bite() {
  GUIOff(BATTLE);
  Display("Enemy will use Bite!");
  SetObjectGraphic(2, 123);
  SetGlobalInt(105, (GetGlobalInt(1))-(GetGlobalInt(76)+1));
  SetGlobalInt(1, (GetGlobalInt(1))-(GetGlobalInt(105)));
  DisplayMessage(546);
  SetObjectGraphic(2, 0);
  dead_check();
}



However, in the game, the GUIOff(BATTLE); commmand seems to be completely ignored!  Also, the SetObjectGraphic commands are ignored whenever I call them from functions.  I'm flabergasted!  The GUI won't turn off when I tell it, and my objects won't change graphics!  What I am doing wrong this time?
"Power is not a means - it is an end."

Gilbert

Is it possible that the GUI got turned back on in some other part of your script (and also the object graphics got changed back in some other place) ? Did other part of that function work (like displaying that message) ?

Akumayo

That's the weird part, everything works as far as I can see except that the objectgraphics won't change and the BATTLE GUI won't turn off!  I checked the script, it's set up as a popup-modal, there is nowhere but functions that it's told to turn on, and it never blinks on/off at all after it comes on...

IT'S DRIVING ME MAD!!!!
"Power is not a means - it is an end."

Gilbert

If it's a pop-up modal, the game is supposed to be paused when it's on. Try changing it to persistent and see if it helps.

Akumayo

Nope, still stays on when told to go off...
"Power is not a means - it is an end."

Gilbert

Hmmm is it possible to zip your room and ac2game.dta in problem for us to investigate? it's a bit difficult to figure out the problem with such small info.

Akumayo

-sigh-, its called in a function, so not really, but I can supply you with the startup of the global script if that helps, or will it only hurt?
"Power is not a means - it is an end."

Gilbert

Maybe you can post the codes around that function is called.
Also, are there any other popup modal GUI's on while it's happening?

Akumayo

no, there was a popup modal MENU opener GUI, but it is turned off succesfully at the start of the battle.
"Power is not a means - it is an end."

SMF spam blocked by CleanTalk