Hmmmm, I think I was doing something terribly wrong. Before when I imported a file to the root directory and used "include "blah.galaxy"" it didn't work. Perhaps I didn't import it properly. All is working properly now, thanks =)
I don't really understand this error. Am I only getting this because the event TriggerAddEventDialogControl requires a fast runtime? If so, my code really should be fine, because it just stops the buttonClicked trigger.
Or is it just that any trigger cannot exceed an execution time of .25s?
Do I need to create another trigger, and run that?
Don't have any syntax errors when I compile. Neither does anything else if I comment out these three lines.
But...if I don't comment out those lines, I get a syntax error for every single line after those three. I tried commenting out every line after those three, and every line after those commented lines gets a syntax error.
I'm very new to Galaxy, and I cannot figure out why I'm getting a syntax error.
intsafeZone=30;tempRegion=RegionRect(0,0,safeZone,safeZone);RegionSetCenter(tempRegion,heroPoint);fixedavgDistanceFromCenterToEdge=(Pow(mapSizeX,2)+Pow(mapSizeY,2))/4;fixedtempfixedX=RandomFixed(mapSizeX/4-offset,mapSizeX/4+offset);fixedtempfixedY=RandomFixed(mapSizeY/4-offset,mapSizeY/4+offset);fixedheroX=PointGetX(heroPoint);//x-loc of herofixedheroY=PointGetY(heroPoint);intaddX=1;//for while loop logicintaddY=1;
I get a syntax error here, if I try to run the code as is.
I've tried the AIBuild function, but it doesn't seem to work. I have town set to 1 (even though I do not know what that means), and flag set to -1 (again, no idea what that means).
Also, I'm trying to create a map that slightly randomizes its terrain. I haven't been able to find any actions that modifies terrain. Is this something that is just not allowed by the engine?
Thanks in advance!
EDIT: Never mind on the building thing. I didn't realize that buildings were classified under Units. The terrain question still stands though.
EDIT2: Sigh. I spent a pretty long time figuring this stuff out before posting, but I just figured out both. Ignore this post :/.
0
@MotiveMe: Go
Hmmmm, I think I was doing something terribly wrong. Before when I imported a file to the root directory and used "include "blah.galaxy"" it didn't work. Perhaps I didn't import it properly. All is working properly now, thanks =)
0
After I import a .galaxy file, what path do I use to include it?
Thanks in advance :)
0
I'm getting the "execution took too long error" when I try to run a function from a trigger with the event:
I'm trying to correct this error with this:
<<code>>
TriggerStop(buttonClicked);createMap(true);<</code>>
I don't really understand this error. Am I only getting this because the event TriggerAddEventDialogControl requires a fast runtime? If so, my code really should be fine, because it just stops the buttonClicked trigger.
Or is it just that any trigger cannot exceed an execution time of .25s?
Do I need to create another trigger, and run that?
0
@MTops: Go
Ohhhh, well that's pretty inconvenient. Do I have to do this for the entire code, or just per function?
0
@wOlfLisK: Go
I don't think you're truly understanding the problem here. But yes, I do have these declared:
0
tempRegion and heroPoint are global variables (well, I don't actually know if they are). But they would be if this is C. I declared them like this:
The first three lines
Don't have any syntax errors when I compile. Neither does anything else if I comment out these three lines.
But...if I don't comment out those lines, I get a syntax error for every single line after those three. I tried commenting out every line after those three, and every line after those commented lines gets a syntax error.
I'm so confused.
0
I'm very new to Galaxy, and I cannot figure out why I'm getting a syntax error.
I get a syntax error here, if I try to run the code as is.
However, if I comment out the first 3 lines, then there is no syntax error. Anybody know why that is?
Also, I have no idea how Galaxy's automated garbage collector works. Do non-global variables get automatically cleaned up once the function is done?
Thanks in advance :)
0
I'm getting started with Galaxy, and regions are really confusing me.
Why does this line get a syntax error? region startingZone = RegionEmpty();
Also, I don't understand the function RegionAddCircle(). How do you create a variable from the region that was added?
0
I've tried the AIBuild function, but it doesn't seem to work. I have town set to 1 (even though I do not know what that means), and flag set to -1 (again, no idea what that means).
Also, I'm trying to create a map that slightly randomizes its terrain. I haven't been able to find any actions that modifies terrain. Is this something that is just not allowed by the engine?
Thanks in advance!
EDIT: Never mind on the building thing. I didn't realize that buildings were classified under Units. The terrain question still stands though.
EDIT2: Sigh. I spent a pretty long time figuring this stuff out before posting, but I just figured out both. Ignore this post :/.