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

#1
I slept on it and changed my approach, there wasn't a real need for it but at the time I thought it might be a tidier way to do it. Thanks for responding however :-D
#2
Sorry to bump something four years old, but this seems like the spot to ask my question.

In my global script I declare a normal array, then in my global script header I define it as a struct of integers. That works fine as a fixed struct array (different room scripts assign values to the integers depending on the player's current room)...

...but now I want to make it a dynamic array whose size and values are reassigned by each room. I could declare a different fixed struct array in each room, but I was really hoping I could keep the info it stores in my global script so I can export and use it in other scripts. I can't use global variables because the size of the array ranges from 400 to 6400.

I just want a struct array whose size can be changed by each room, without losing the ability to use its values in other scripts or a workaround.

Quote from: monkey_05_06 on Fri 06/05/2011 19:50:14
use dynamic arrays outside of the struct and simply use a struct interface (specifically, struct functions) for getting/setting the items you need

the contents of the array are character values being parsed from strings, so during parsing I would store each value one at a time in a global variable and then (?)pass it(?) to a dynamic array within my global script?

I hope that makes sense, I'm really tired and I can barely remember what problem I had in the first place. Cannot create dynamic array of unmanaged struct.

Thanks!
#3
Jeezum Crow... I'm still getting gibberish. I get furthest with XML but I still get gibberish. Just going to try and write the files I want with AGS and the text prompt
#4
Okay I found something. Going through with all my displays looking for the unconverted ASCII number and looking at the ASCII table, I found that the type A actions are, on the seventh pass, attempting to run on the wrong Segments[] for that block. Later, it gets further off, moving to the Segments[] containing the letters representing the name of the word. When that happens, sometimes the first character, (Chars[0]) is either a or b, which is the first character of my alphabetized word names. So I've checked the actual segments after storage about 10 times now, those are fine. There must be a problem with the parser getting off base? the Verb_Data_Unit = iteration % 3; and if 0, if 1, if 2 business?

--Edit: The script wasn't getting off on its own, special characters not visible in the text editor were throwing it off--

Although eventually it ends up showing me ASCII codes for 52, 55, 57 and 59 which don't appear anywhere in the data file, especially not semicolon, but that only happens once it moves to the second batch of ReadRawLineBack() line segments. So this is probably two problems at once. 

Well, saving the original text file as ANSII gets me closest so far, but I still get phantom semicolons. Unicode and UTF-8 produce similar errors but with some slightly different characters, but it still doesn't tell me whether or not I'm trying to perform actions on the wrong segment in the parser. Trying XML... 
#5
Okay. I converted to boolean, and all of the (currentSegment.Chars[] == 1) values are correctly translating at first.

Halfway through each 'line' (as read back by ReadRawLineBack() and then stored in Segments[]) I start getting incorrect values.

Here is the display of each of the four variables as they roll in:

0,0,1,1    0,0,1,1    0,0,1,1    0,0,1,1    0,0,1,1    0,0,1,1    -48,0,0,0    7,0,0,0    8,0,0,0    9,0,0,0    1,0,0,0    1,1,0,0    1,0,0,0    49,0,0,0    49,0,0,0    49,0,0,0    49,0,0,0    49,0,0,0    //And then back to working//    0,0,1,1    0,0,1,1

...and so on. messes up again later (I think the second half of the second 'line').     

Now I'm thinking its back to my separation by spaces process. Any thoughts? The Display of each Segment as it comes in is perfectly correct, and the text file is meticulously correct, though I have no idea if what I see in Notepad is what AGS sees in computer language, ASCII?

I just want to load several values and a string or two into a struct array from an external text file, but at this rate each text file could only contain up to six chunks of variables.

I know about the max character limit to ReadRawLineBack()... does it recognize the carriage return in Notepad to indicate a new line? Is a tab or carriage return -48 or 49 in ASCII? bizarre

Afaik nobody has tried converting ReadRawLineBack() characters from an external text file to integers past 60 or so characters?

Oh duh. The booleans are working, it just still can't handle an int. I guess I'll figure out a way to work around that, enum for the tense and so on. Let's just call this solved unless someone finds it interesting.
#6
Thank you thank you all three. I really appreciate the assist on my learning the code, which none of you are personally invested in. Thanks thanks thanks!

Edit: Still get the invalid index. Using display, I checked every Segments[] as it was stored (several times) and there were no problems. I added Truncate(4) to the type "A" chunks just to be sure they had four characters only. The code works like a charm until the second phase, at exactly Segments[20], where it tries to...

conversion_buffer_2 = Segments[Current_Segment_Tracker].Substring(1, 1);

...at exactly the second digit (index 1, the character in the segment is 0). That's where I'm confused. Is it possible that the code is running through that block of statements too fast or something? Like I said, no flaw in the text file. It must just be math somehow? All segments definitely stored correctly.

Trying the Chars[] digit conversion now
#7
Code: AGS


int iWS;
int iteration;
int Current_Segment_Tracker;
int Lines_Read;
int nSegments;
int Verb_Data_Unit;

String File_Lines[100];
String Segments[1000];

struct Lexicon_Verb {   //                        *VERBS*
  int tense;  //  0=directive, 2=past, 3=present
  int known_Subject;  //  0=no, 1=yes
  int abbey_capable;  //  0=no, 1=yes
  int user_capable; //  0=no, 1=yes
  String Word_Text;
  int Sound_File;  
};

Lexicon_Verb Verb[1000];

String conversion_buffer_1;    //    since I can't just say Segments[0].Substring(0, 1).AsInt
String conversion_buffer_2;    //    probably don't need 4 of them, but peace of mind
String conversion_buffer_3;
String conversion_buffer_4;

function Load_Lexicon_Verbs()               //===============----------------      Below is all tested and works great until @@@
{
  bool bKeep_Loading_Verbs = false;
  bool bKeep_Segmenting_Line_Verbs = false;
  iteration = 0;  //  reset iteration to zero before segmenting
  nSegments = 0;  //  reset nSegments to zero before segmenting a new string
  iWS = 0;  //  reset white space tracker
  Lines_Read = 0;
  Current_Segment_Tracker = 0;
  gLoading_Box.Visible = true;   // turn on the loading box, it just shows me what steps are working
  
  if(Verbs_Loaded == 0)
  {
    File *load_verbs = File.Open("Lexicon_Verbs.txt", eFileRead);
    while(!load_verbs.EOF && Lines_Read < 100)
    {
      File_Lines[Lines_Read]= load_verbs.ReadRawLineBack();
      Lines_Read++;
    }
    load_verbs.Close();
    bKeep_Segmenting_Line_Verbs = true;
    while(bKeep_Segmenting_Line_Verbs)
    {
      iWS = File_Lines[iteration].IndexOf(" ");
      if(iWS == NOT_FOUND)
      {
        Segments[nSegments] = File_Lines[iteration];
        iteration++;
        if((iteration + 1) > Lines_Read)
        {
          bKeep_Loading_Verbs = true;
          bKeep_Segmenting_Line_Verbs = false;
        }
      }
      else
      {
        Segments[nSegments] = File_Lines[iteration].Truncate(iWS);
        File_Lines[iteration] = File_Lines[iteration].Substring(iWS + 1,  File_Lines[iteration].Length);
      }
      nSegments++;
    }
    //    @@@=================================-----------------                   @@@  Above is all tested and works great @@@
    iteration = 0;
    while(iteration < nSegments)
    {
      Verb_Data_Unit = iteration % 3;
      if(Verb_Data_Unit == 0) //  now we're dealing with a Segments[] String of 'type A'
      {
        conversion_buffer_1 = Segments[Current_Segment_Tracker].Substring(0, 1);
        Verb[iteration].tense = conversion_buffer_1.AsInt;
        conversion_buffer_2 = Segments[Current_Segment_Tracker].Substring(1, 1);
        Verb[iteration].known_Subject = conversion_buffer_2.AsInt;
        conversion_buffer_3 = Segments[Current_Segment_Tracker].Substring(2, 1);
        Verb[iteration].abbey_capable = conversion_buffer_3.AsInt;
        conversion_buffer_4 = Segments[Current_Segment_Tracker].Substring(3, 1);
        Verb[iteration].user_capable = conversion_buffer_4.AsInt;
        Current_Segment_Tracker++;
      }
      else if(Verb_Data_Unit == 1)  //  'type B'
      {
        Verb[iteration].Word_Text = Segments[Current_Segment_Tracker];
        Current_Segment_Tracker++;
      }
      else if(Verb_Data_Unit == 2)  //  'type C'
      {
        Verb[iteration].Sound_File = Segments[Current_Segment_Tracker].AsInt;
        Current_Segment_Tracker++;
      }
      iteration++;
    }
  }
}


The abridged contents of Lexicon_Verbs.txt:

0011 accept 0 0011 add 1 0011 admire 2 0011 admit 3 0011 advise 4 0011 afford 5 0011 agree 6
0011 alert 7 0011 allow 8 0011 amuse 9 0011 analyze 10 0011 announce 11 0011 annoy 12
0011 answer 13

...and so on. I already tested the ability to correctly read two consecutive lines, no problem there. No typos or deviations from that format in the file.

So I'm not trying to make it as complicated as possible, I just don't know why substring gives an invalid index when I use it instead of the .Chars[] reading.
#8
Thanks!    So is a character stored as a string or an int?

Code: AGS

{
String a;
String b;

String b = "0011";

a = b.Chars[0];
}


doesn't seem to be working. "Cannot convert char to String"

I want to convert a value from the read only characters array to an integer then.

Quote from: Khris on Thu 26/06/2014 08:03:48
...you're making things much more complicated than they are; getting single characters from a String is trivial..
Seems like it should be (8 but I don't want to display it, I want to store it. I wouldn't make it that complicated, except Substring is returning an "invalid index" error, even after I corrected my above script by including a tracker int instead of iteration, which was the wrong int. Maybe I should post a more revealing script.
#9
Doh! So my slow brain, here goes... permit me to explain my logic...

What I have done, is read my text file using ReadRawLineBack(), then I looked for spaces and stored the characters between the spaces into there own little string array instances (Segments[nSegments]). Easy Peasey. I want to store the contents of every three now-existing strings which belong to my Segments[] String array[] into different instances within a different struct array called Verb[]. I think of the first Segments[] String as being of type A, the next of type B, the next is type C, then back to A in the order they appear in my Segments[] String array.

Next I want to separate the contents of my Segments[] String array according to their respective type (A, B, or C) and store those different types as different variables in my Verb[] struct array, where Segments[] Strings from type B remain strings, Segments[] Strings from type C become a single int, and Segments[] Strings from type A get broken down into four separate int values that need to be stored as four separate int variables in my Verb[] struct array. Okay.

The trouble I'm having is that last bit (which needs to happen first)--the process of breaking down a Segments[] String of type A into four separate int values and storing them as the separate variables they represent within my Verb[] struct array.   

I think I might be able to do that if I eFileWrite the contents of only my Segments[] Strings of type A, one type A Segments[] String at a time, into a temporary text file (made by AGS). Then I can use ReadRawChar(), which operates from right to left mental note, to pull each character from that string in the temporary text file and store it where it belongs (after converting it using AsInt(), much like above).

This is me trying something different because I think I'm having trouble with baby's first math problem in my original code. I'll update this post if it works.

Inspired by Monkey_05_06: http://www.adventuregamestudio.co.uk/forums/index.php?topic=31879.msg411221#msg411221 and in light of the problems I'm having using Substring().

I still think Substring() should work as coded above, but I might also have a 'space' character at the end of most of my Segments[] Strings, which is a problem since the last of those certainly doesn't have a space at the end. At least I'll figure out which of those three possibilities is my original problem. Blah

I know this is riveting stuff

Update: Oh for the love of crap

Code: AGS

        File *temp_string_to_sort = File.Open("Temp_String_Storage.txt", eFileWrite); //  open or create a temporary file to store the string I         want to sort
        temp_string_to_sort.WriteString(Segments[iteration]); //  write the 'type A' string to that temp file
        Display("%c", temp_string_to_sort.ReadRawChar());


just Displays "?"

So this must be a formatting problem? I pulled a string from a .txt file made in Notepad (using ReadRawLine()), then had AGS write it to a new .txt file (using WriteString()), then read back a character from the file it wrote (ReadRawChar()). The original Notepad file contains no '?', so there must be a problem interpreting raw strings from Notepad files? Is that definitively the problem I'm running into? Because in my previous code, I had no trouble recording at least six perfect strings AND converting at least six strings to int variables using ReadRawLine() and .AsInt().

What's the deal--I'm a plumber and a hippie and I'm sorry if there has been any breach of "Beginner's Technical Questions" forum etiquette.
#10
cRoger that. I'll try .txt and check out .xml. I used Display commands after receiving each error to determine that the problem occurs immediately after Sound_File = 6, but I'll see what I can do. I think I'll take a shower and go get something to eat first though... been a while (8

Yep still not working with .txt files, may just need to try other things
#11
Well crud, it still throws the invalid index error at the same iteration. I'm not sure what other information would help. I'm thinking it has to do with the fact that I'm having it read string contents that AGS didn't create? Just using Notepad to make .rtf files to read, but I was really hoping I could use formatting to make it work. I saw the warning in the manual, but it did work to correctly store the segments as Strings... I'm stumped.

If it makes any difference, this is a nested while loop, but the outer just checks for spaces
#12
Awesome! I knew a gauntlet of just if statements was bad form but I never was much good with code in general. I can usually find what I need in posts but I sometimes have a hard time following the action in my own script :tongue: Ty ty.
   
    I'm just going to link these in here in case anyone else is trying to read text files with ReadRawLineBack() if that's alright, they were really helpful for me:

Scotch:
http://www.adventuregamestudio.co.uk/forums/index.php?topic=29871.msg381385#msg381385

and more recently Billbis:
http://www.adventuregamestudio.co.uk/forums/index.php?topic=49860.msg636478748#msg636478748
#13
Hey gang,

    Here's something I can't solve that you've probably seen a million times before. First the code:

Code: ags

    iteration = 0;
    Verb_Data_Unit = 1;
    while(bKeep_Loading_Verbs)
    {
      if(Verb_Data_Unit == 4)
      {
        Verb_Data_Unit = 1;
      }
      if(iteration > nSegments)
      {
        bKeep_Loading_Verbs = false;
      }
      if(Verb_Data_Unit == 1)
      {
        conversion_buffer_1 = Segments[iteration].Substring(0, 1);
        Verb[iteration].tense = conversion_buffer_1.AsInt;
        conversion_buffer_1 = Segments[iteration].Substring(1, 1); //  This line is highlighted when I get my error
        Verb[iteration].known_Subject = conversion_buffer_1.AsInt;
        conversion_buffer_1 = Segments[iteration].Substring(2, 1);
        Verb[iteration].abbey_capable = conversion_buffer_1.AsInt;
        conversion_buffer_1 = Segments[iteration].Substring(3, 1);
        Verb[iteration].user_capable = conversion_buffer_1.AsInt;
      }
      if(Verb_Data_Unit == 2)
      {
        Verb[iteration].Word_Text = Segments[iteration];
      }
      if(Verb_Data_Unit == 3)
      {
        Verb[iteration].Sound_File = Segments[iteration].AsInt;
      }
      iteration++;
      Verb_Data_Unit++;
    }
  }
}


    The code works pefectly fine until a specific iteration, maybe 19th? when I get the null index at that line. I can't figure out why it would be inside that if statement at that iteration. I'm wondering if my math is such that since 21 (counting iteration 0) is a multiple of three, my little Verb_Data_Unit ticker with three modes is getting out of sync? The strange part to me is that it gets each variable correct until finally Verb[iteration].Sound_File = 6, then it throws the error. Is the answer obvious?

This is the same number and arrangement of characters in each segment it could view, I already proved to myself that they each are intact:

0011 <--segment 0
accept <--segment 1
0    <--segment 2

0001 <--segment 3
allow <--segment 4
1    <--segment 5        ...and so on...

    I have all of these segments, read from a .dat via ReadBackRawLine(), segmented with great thanks going to JSH, but I want the sorting process to put three different types of segments in their homes, where the first section is four numbers with four different homes. Blah. Is it something to do with .AsInt?

    the null index is probably referring to one of the single-character segments, but I can't wrap my brain around how my system ends up trying to index one of those with substring, when it should be messing with the Sound_File variable?

Sorry to keep bothering everyone... I know this isn't really an adventure game

-Joel 
#14
Thanks for helping with that problem!

Now that I can separate my strings into individual words, I want to write them to .rtf log type files, and I have no problem doing that.

However, I want to jump into one of those .rtf files, or .dat or what have you, go to a specific line in that file and change a character without overwriting the rest of the characters in the file.

Am I limited only to eFileWrite and eFileAppend? I know about WriteRawString and WriteRawCharacter, but I can't find a method to change a specific character without overwriting the rest of the file contents or simply appending.

I want to store variables and strings in a .dat with the intent to read and edit them accross seperate game sessions. That way, my pathetic AI can store memory outside of its code which will allow it to "learn" more variables than it was originally given. Does that make sense?

I'm trying to store things in .dat files to be read later and I want the ability to edit them in part rather than rewriting the entire file.

The structure of the .dat would be something like a seperate variable on each newline, where the program could be directed to the line in a file and either read or change the character or number on that line.


sigh


Doh nevermind, I found out how read it, replace char at, and rewrite it. Thanks! Keeping the sigh though
#15
Excellent! Thanks guys.

eKeySpace is only useful at the time it gets on-key-pressed right? I know I could save a word once space was pressed but I want the user to be able to edit the scentence before submitting with enter

That was my problem, "" vs ''

Kathy Rain looks amazing btw!
Yea I couldn't wrap my brain around a solution with the parser, but this looks fine, dandy even

#16
Can't find the solution around the place

I have a string which contains multiple words separated by spaces, and I want to format it into a separate string for each word. It could be this sentence!

Code: ags

String user_text_input;    //    this is the raw string input from a text box prompt, "It could be this sentence!"

String first_word;
String second_word;    //    and so on...

function Input_Formatting() {
    if (user_text_input.Chars[1] == ?)    //    and I'm stumped. I want '?' to be the symbol for a space. How do I refer to a space here?


    If that isn't clear, I'm trying to go character by character through the input string to find a space, then I can store the preceding characters in my first_word string. I bet I can use variables to keep track of which Chars[] I've checked and need to ignore to keep moving through the string to find the next space and save the next word and on and on, through a long if (user_text_input.Chars[]==?) gauntlet to cover all of the characters allowed in my simple text box.

    This way I can know the order of the words, parse them for a word group and then have some clue what the user meant in a more thorough way.

    How do I look for a space in a string? Are there spaces in strings? Are there strings in space? :~(

-Joel
#17
Hey folks,

     I'm Joel, 28, I've been playing with AGS scripting and popping in and out of the forums for years now--if you wrote something about code I may have read it. I rarely post. Anyway, I didn't really know where to stick this so feel free to move it or chuck it.

     A long time ago I made this short game for my little niece Ezzy. I thought someone(?) might be interested in it because I tried to feign the appearance of scrolling by rolling in hills and enemies from off screen, then recycling them and so on, which I'm sure has been done before. One room, a handful of objects and no real ending, just kinda survival mode goblin-poking unicorn-riding toddler fun.

     I had advance notice that I was going to babysit her so I made this game the day before--the graphics and effort kinda reflect that, but for what it is it came out great. Not really looking for criticism since I already know whats up with it. Enjoy!


         


     Download link: (19.4 MB)

     http://www.filedropper.com/castle

Think of it as endless mode, since there isn't an end :P

Right arrow to go! Space to poke with the unicorn. Collect the coins for personal satisfaction!

If you run out of goblins to poke, just come to a stop by letting up on the arrow, then resume.

Cheers
#18
Okay... I'm so sorry guys. I just backed up all of my things and reformatted. I'm pretty dense, but AGS uses DirectX correct? I was having a bunch of different visual issues with a 3D modelling program that also uses DirectX and I just decided to start fresh. Haven't set up AGS yet but I'll follow up if it happens again. I'm 90% sure it had more to do with a different demon in my computer
#19
I'm running a bunch of int checks and animation commands (eNoBlock) in the room's rep_exec for many objects in the room (but I can't see any reasons why blocking would happen), but now I'm wondering if it is a Z-order issue from an animating room object with a Z-order of 1?  Nothing in global rep_exec or rep_exec_always so far. Here's my room script:

Starshift is a function for moving a chain of StarObj objects across the top of the screen which relies on the room's rep_exec. All of the animations use alpha if that adds up? gSplash is my problem GUI.

Code: AGS


// room script file

int Obj1View=2;
int Obj2View=3;
int Obj3View=4;
int Obj4View=5;
int Obj5View=6;
int SpiritOn=0;
int TitleOn=0;
int ArcPicOn=0;

function StarShift(Object* StarObj){
  if(StarObj.GetProperty("StarNumber")==1){
    if(Obj1View>=6){
      Obj1View=(Obj1View+5)-9;
    }
    else{
      Obj1View+=5;
    }
    StarObj.SetView(Obj1View, 2);
    StarObj.Animate(2, 5, eRepeat, eNoBlock);
  }
  if(StarObj.GetProperty("StarNumber")==2){
    if(Obj2View>=6){
      Obj2View=(Obj2View+5)-9;
    }
    else{
      Obj2View+=5;
    }
    StarObj.SetView(Obj2View, 2);
    StarObj.Animate(2, 5, eRepeat, eNoBlock);
  }
  if(StarObj.GetProperty("StarNumber")==3){
    if(Obj3View>=6){
      Obj3View=(Obj3View+5)-9;
    }
    else{
      Obj3View+=5;
    }
    StarObj.SetView(Obj3View, 2);
    StarObj.Animate(2, 5, eRepeat, eNoBlock);
  }
  if(StarObj.GetProperty("StarNumber")==4){
    if(Obj4View>=6){
      Obj4View=(Obj4View+5)-9;
    }
    else{
      Obj4View+=5;
    }
    StarObj.SetView(Obj4View, 2);
    StarObj.Animate(2, 5, eRepeat, eNoBlock);
  }
  if(StarObj.GetProperty("StarNumber")==5){
    if(Obj5View>=6){
      Obj5View=(Obj5View+5)-9;
    }
    else{
      Obj5View+=5;
    }
    StarObj.SetView(Obj5View, 2);
    StarObj.Animate(2, 5, eRepeat, eNoBlock);
  }
  StarObj.X=-120;
  StarObj.Move(440, 83, 1, eNoBlock, eAnywhere);
}
    

function room_Load()
{
  gSplash.Visible=true;
  objSky.SetView(1, 1);
  objSky.Animate(1, 8, eRepeat, eNoBlock);
  objMts.SetView(1, 8);
  objMts.Animate(8, 3, eRepeat, eNoBlock);
  obj1.SetView(2, 2);
  obj1.Animate(2, 5, eRepeat, eNoBlock);
  obj2.SetView(3, 2);
  obj2.Animate(2, 5, eRepeat, eNoBlock);
  obj3.SetView(4, 2);
  obj3.Animate(2, 5, eRepeat, eNoBlock);
  obj4.SetView(5, 2);
  obj4.Animate(2, 5, eRepeat, eNoBlock);
  obj5.SetView(6, 2);
  obj5.Animate(2, 5, eRepeat, eNoBlock);
  obj1.Move(440, 83, 1, eNoBlock, eAnywhere);
  obj2.Move(440, 83, 1, eNoBlock, eAnywhere);
  obj3.Move(440, 83, 1, eNoBlock, eAnywhere);
  obj4.Move(440, 83, 1, eNoBlock, eAnywhere);
  obj5.Move(440, 83, 1, eNoBlock, eAnywhere);
  objMan.SetView(1, 2);
  objYeti.SetView(1, 4);
  objYeti.Animate(4, 3, eRepeat, eNoBlock);
  objTot.SetView(1, 6);
  objTot.Animate(6, 1, eRepeat, eNoBlock);
  SetTimer(1, 30);
  objSpirit.SetView(1, 0);
  objSpirit.Animate(0, 3, eOnce, eNoBlock);
  objTitle.SetView(1, 12);
  objTitle.Animate(12, 3, eOnce, eNoBlock);
}

function room_RepExec()
{
  if(TitleOn==0){
    if(IsTimerExpired(2)==1){
      TitleOn=1;
    }
  }
  if(TitleOn==1){
    if(objTitle.Animating==0){
      objTitle.Animate(11, 1, eOnce, eNoBlock);
      SetTimer(2, 160);
      TitleOn=0;
    }
  }
  if(SpiritOn==0){
    if(IsTimerExpired(1)==1){
      if(objTitle.Animating==0){
        objTitle.Animate(10, 3, eOnce, eNoBlock);
        TitleOn=1;
      }
      if(objSpirit.Animating==0){
        objSpirit.Animate(9, 3, eRepeat, eNoBlock);
        SpiritOn=1;
      }
    }
  }
  if(obj1.X==440){
    StarShift(obj1);
  }
  if(obj2.X==440){
    StarShift(obj2);
  }
  if(obj3.X==440){
    StarShift(obj3);
  }
  if(obj4.X==440){
    StarShift(obj4);
  }
  if(obj5.X==440){
    StarShift(obj5);
  }
  if(objMan.Animating==0){
    if(objMan.X==23){
      objMan.Animate(3, 5, eOnce, eNoBlock);
      objMan.Move(38, 135, -7, eNoBlock, eAnywhere);
    }
    if(objMan.X==38){
      objMan.Animate(2, 5, eOnce, eNoBlock);
      objMan.Move(23, 129, -7, eNoBlock, eAnywhere);
    }
  }
}



[edit] I changed my GUI to a smaller size and it works like a charm now (I can even add a bunch more animations with no problem) but for some reason, any time I set the GUI to dimensions of 320x240 it flickers! I'm just going to chalk this up to some weird thing dependent on my hardware or something? [/edit]
#20
I'm stumped again! I found some other posts that helped me narrow the field, but I can't figure this out...

The game is 320x240 32-bit, newest AGS, my computer is Vista

I'm trying to use a 320x240 GUI (the size of the room) with 9 buttons and no other features. The buttons are small sprites, the majority of the GUI is transparent. I'm doing this because I already have around twelve animating objects in this room and it seemed like a good idea to throw nine into one GUI (which I may want to use elsewhere anyway). My GUI flickers!

The only code remotely related to the GUI is a simple "gMyGUI.Visible=true;" in the Room_Load department. I had lots of code related to it earlier, but after reading posts related to what I was trying to do with no luck, I decided to remove all of the code that uses the GUI just to see if simply displaying it would work, and I can't get it to behave. I was very thorough in making sure no code related to my GUI still exists, I just want to display it properly at this point.

It displays for about four seconds and then shuts off, then about half a second later it displays again (over and over).

When player interface is disabled, GUI's should "be hidden"

is that what's happening? No code disables the GUI, so I'm wondering if slow-down from lots of alpha'd .png animations is disabling player interface? When I switch to "...should Display Normally" it doesn't flicker, but I'm not able to manipulate it with code, it still seems to hang every four seconds or so.

Thanks! 

*Not using any blocking scripts etc*
SMF spam blocked by CleanTalk