Moresco
12-16-2006, 07:20 AM
So, if it does, what is it returning??? I was hoping I could get the number of the screen I'm currently on, and somehow use that to my advantage whilest coding. Unfortunatley, since I can't test the variable to like, print the current value or anything, I have to guess. The screen is M1 S46 according to ZQuest's menu. Soooo, that can't be right, because 46 is hex, right? On my window, if I scroll right, 46 goes up to 49, and then becomes 4A...until 4F being the final before moving on to 50. Anyway I converted 46 from hex to decimal, and the script still wasn't working (I resorted to playing sounds to see if my statements were working).
So this is the code I worked out, and the only thing the compiler would accept, hope I got it right:
int variableName = 0;
variableName = Game->GetCurScreen();
So then I finally got somewhere searching for whatever value was being stored in the variableName. But, it was above 0 and below 4. But did not == 0, 1, 2, 3, or 4...so what gives? I'm doing this wrong...I must be.
Anyway I'm also having trouble with Game->GetCurMap();
What are these functions doing? I play the game, ask it to run an if statement when the Current Map is == to 1, the map I'm playing on, the overworld and first map I made. but it doesn't run, so I asked it to run if the current map is == to 0, and voila...it ran. So I initialized the variable to 3, just to see if it would run again and claim it was on map 0. It did, so it thinks it's map 0. In the ZQuest, it says it is Map 1.
Back to GetCurScreen....which I still don't understand. I tried putting this in a while loop, using waitframe() and recalling GetCurScreen at the beginning of every iteration of the while loop. It still claims the screen value returned is greater than zero, but not greater than 1. I tried asking it if it was greater than 0.1, and it said no.
So in conclusion, does anyone else understand these? Am I totally wrong? Help me out.
So this is the code I worked out, and the only thing the compiler would accept, hope I got it right:
int variableName = 0;
variableName = Game->GetCurScreen();
So then I finally got somewhere searching for whatever value was being stored in the variableName. But, it was above 0 and below 4. But did not == 0, 1, 2, 3, or 4...so what gives? I'm doing this wrong...I must be.
Anyway I'm also having trouble with Game->GetCurMap();
What are these functions doing? I play the game, ask it to run an if statement when the Current Map is == to 1, the map I'm playing on, the overworld and first map I made. but it doesn't run, so I asked it to run if the current map is == to 0, and voila...it ran. So I initialized the variable to 3, just to see if it would run again and claim it was on map 0. It did, so it thinks it's map 0. In the ZQuest, it says it is Map 1.
Back to GetCurScreen....which I still don't understand. I tried putting this in a while loop, using waitframe() and recalling GetCurScreen at the beginning of every iteration of the while loop. It still claims the screen value returned is greater than zero, but not greater than 1. I tried asking it if it was greater than 0.1, and it said no.
So in conclusion, does anyone else understand these? Am I totally wrong? Help me out.