@SBeier:
Of course, although, technically you should be able to inject the key press without too much fuss I believe. Anyway, pressing a key (or whatever you choose) is a small price to pay. ;)
I just looked into a solution for not restarting SC2 every time you compile, and it seems that it is possible with some minor code injection:
GameSetNextMap("Test/Galaxy++TestMap.SC2Map");
GameOver(1, c_gameOverVictory, false, false);
(and this at the start of InitMap: TriggerDebugWindowOpen(true);)
That will load the specified map... now combine that with TriggerAddEventKeyPressed and voila. The editor can now let you compile and test new maps without exiting StarCraft 2. However, the editor will need to keep track of 2 compiled maps, That it alternates between, when one is locked, it saves to the other, and the two maps sets the other one as "NextMap" (and if none of them are locked, launch StarCraft 2).
meaning it forgets the second variable (also, wouldn't it be better/faster to just assign the previous variable to the next, rather than storing the value in an intermediate variable?
for-loops are broken too, increment is done at the end of the while-loop... however, it does not generate increment for continue, so you get an infinite loop.
(also, minor bug with find/replace, it doesn't find the first occurance)
Okay.. I need some other more reliable ftp server software.. The ftp server will be unavailable while I get that working.
Edit:
Got it up and running again. Please note that you will have to update next version manually, since the protocol for downloading files has changed a bit.
Where do I find the latest version? 2.0.0 is the latest one on your FTP.
EDIT: never mind, the FTP client had cached the content
1: Are you sure it's an issue? When I try it, it works just fine, as long as I save the changes I made in the normal editor, those changes are there when I test the map from my editor, even if it doesn't recompile the script.
Yeah, it could be a user error on our part or some strangeness with the SC2 editor (slow saving?).
So if it works for you then yeah, it's most likely some external "issue". Can't be sure if this has been happening lately as I'm "working around it" by changing the source code, but I'll try without that when I'm home and I'll see if it occurs again.
Awesome work with the editor, not sure what I would do without it. ;)
1. Yeah, if there are no code changes, it is logical to not recompile the code... but I also test the map through your editor after making changes to the map. Meaning, unless I also make some insignificant change in a source file, then it seems like it just runs the last compiled map. It will not include the new changes I've done to the map itself.
2. I'm not aware of any way, I tried to compile the map with SC2 running and simply restart the map in-game, I don't remember exactly what happened, but I don't think it worked... not really sure what SC2 does when you restart. If it reloads it from disk, it might be possible to just rename the running map to something else (to circumvent the SC2 lock on the file) and write a new one with the same name. But I'm unable to test it at the moment as I'm still at work. Although I doubt that it would actually work out.
Not sure, it could have been an issue with me running it straight from the zip-file, perhaps one of the library-files didn't get read correctly? Anyway, never had it before, and can't reproduce it so probably not a big issue.
Anyway, there is another very minor issue in the editor right now, when clicking on a character to place the cursor, rather than snap to the closest position, it always snaps to the position on the left... example: ABC, if you click on ABC, regularily, when you click on B, depending on where you click on B in a regular editor, the cursor will be placed to the left or the right... in your editor it is always placed to the left.
Another issue I've had infrequently is when editing the map, and "compile and run" from the editor, it seems as if it doesn't always recompile the map, meaning any map changes aren't included. I'm not 100% about this, this could be a user error on my part.
On another subject, is it possible to compile and test a new map without exiting StarCraft 2 every time?
If that's not possible, then I'm curious, for me it takes 2-5 seconds for StarCraft 2 to exit (during which your editor is unusable), however, if I just kill the starcraft process it exits instantly... which to my understanding wouldn't really "break" anything. Is this an "issue" for you too? Would it perhaps be possible to have a "kill starcraft"-button/hotkey in the editor?
Tried the new version (errored when adding a new file to the project, no biggie, sent report).
Anyway, I could no longer replicate the issue with the variables so perhaps its fixed too then.
Tried real quick at work (so can't be sure) and it seemed to have been fixed... however, another issue has just appeared (sent an error message), it seems that whenever it tries to look up variable names it generates an error.
EDIT: Aha! I found the cause of the old crash with }, it seems that it only happens when I don't have "replace tabs with spaces" ticked.
1. The double-click timer in the editor is truly maddening, I personally have it set to the minimal amount of time in windows, while in the editor it is 1-2 seconds or something like that. Meaning, whenever you place the cursor just slightly off, you must wait 1-2sec before clicking again with the mouse or it will interpret it as a double-click and select the word instead (interestingly enough, clicking once more isn't helping either, as it treats that as yet another double-click). I'd really like this fixed or at least be adjustable.
2. Not sure if it has been fixed in 1.9.3, but I had some major issues with crashing when doing nested for-loops yesterday, it would crash every other minute basically. The issue had something to do with {}, it seemed like every time I wrote } in certain places it would instantly crash.
3. Another really disturbing thing is that pressing ESCAPE does not really close any tootips/overlays, but rather inserts a space into the source-file... what's worse is that it really looks like a space but isn't, so it creates really cryptic compile errors.
@SBeier: Go
Awesome!
g_rally_inner[0][1][0] = g_rally_inner[1][0][5] = PointFromId(501);
is broken, only first one seems to be set correctly, the second one appears to stay undefined (it works perfectly when split into separate assigns).
it creates this:
multipleAssignmentsVariable = PointFromId(501); g_rally_outer[0][1][0] = multipleAssignmentsVariable;
meaning it forgets the second variable (also, wouldn't it be better/faster to just assign the previous variable to the next, rather than storing the value in an intermediate variable?
for-loops are broken too, increment is done at the end of the while-loop... however, it does not generate increment for continue, so you get an infinite loop.
(also, minor bug with find/replace, it doesn't find the first occurance)
Where do I find the latest version? 2.0.0 is the latest one on your FTP.
EDIT: never mind, the FTP client had cached the content
Btw, it seems like your FTP (and updater) has broken again.
Yeah, it could be a user error on our part or some strangeness with the SC2 editor (slow saving?). So if it works for you then yeah, it's most likely some external "issue". Can't be sure if this has been happening lately as I'm "working around it" by changing the source code, but I'll try without that when I'm home and I'll see if it occurs again.
Awesome work with the editor, not sure what I would do without it. ;)
@SBeier: Go
1. Yeah, if there are no code changes, it is logical to not recompile the code... but I also test the map through your editor after making changes to the map. Meaning, unless I also make some insignificant change in a source file, then it seems like it just runs the last compiled map. It will not include the new changes I've done to the map itself.
2. I'm not aware of any way, I tried to compile the map with SC2 running and simply restart the map in-game, I don't remember exactly what happened, but I don't think it worked... not really sure what SC2 does when you restart. If it reloads it from disk, it might be possible to just rename the running map to something else (to circumvent the SC2 lock on the file) and write a new one with the same name. But I'm unable to test it at the moment as I'm still at work. Although I doubt that it would actually work out.
@SBeier: Go
Not sure, it could have been an issue with me running it straight from the zip-file, perhaps one of the library-files didn't get read correctly? Anyway, never had it before, and can't reproduce it so probably not a big issue.
Anyway, there is another very minor issue in the editor right now, when clicking on a character to place the cursor, rather than snap to the closest position, it always snaps to the position on the left... example: ABC, if you click on ABC, regularily, when you click on B, depending on where you click on B in a regular editor, the cursor will be placed to the left or the right... in your editor it is always placed to the left.
Another issue I've had infrequently is when editing the map, and "compile and run" from the editor, it seems as if it doesn't always recompile the map, meaning any map changes aren't included. I'm not 100% about this, this could be a user error on my part.
On another subject, is it possible to compile and test a new map without exiting StarCraft 2 every time? If that's not possible, then I'm curious, for me it takes 2-5 seconds for StarCraft 2 to exit (during which your editor is unusable), however, if I just kill the starcraft process it exits instantly... which to my understanding wouldn't really "break" anything. Is this an "issue" for you too? Would it perhaps be possible to have a "kill starcraft"-button/hotkey in the editor?
@SBeier: Go
Tried the new version (errored when adding a new file to the project, no biggie, sent report). Anyway, I could no longer replicate the issue with the variables so perhaps its fixed too then.
@SBeier: Go
Great! Were you able to solve the other issue too? (variable lookup crashes: for(int = 0; i @crash)
The FTP seems to be unavailable.
@SBeier: Go
Tried real quick at work (so can't be sure) and it seemed to have been fixed... however, another issue has just appeared (sent an error message), it seems that whenever it tries to look up variable names it generates an error.
EDIT: Aha! I found the cause of the old crash with }, it seems that it only happens when I don't have "replace tabs with spaces" ticked.
@SBeier: Go
Awesome, downloading right away.
Submitted an error with the }-error. Anyway, if you want to reproduce yourself:
void test() { for(int i=0; i < 10; i) {
} }
Simple remove the first } and put it back, and it should error (might have to remove it once more and put it back again before it crashes).
@SBeier: Go
Awesome work with the editor!
1. The double-click timer in the editor is truly maddening, I personally have it set to the minimal amount of time in windows, while in the editor it is 1-2 seconds or something like that. Meaning, whenever you place the cursor just slightly off, you must wait 1-2sec before clicking again with the mouse or it will interpret it as a double-click and select the word instead (interestingly enough, clicking once more isn't helping either, as it treats that as yet another double-click). I'd really like this fixed or at least be adjustable.
2. Not sure if it has been fixed in 1.9.3, but I had some major issues with crashing when doing nested for-loops yesterday, it would crash every other minute basically. The issue had something to do with {}, it seemed like every time I wrote } in certain places it would instantly crash.
3. Another really disturbing thing is that pressing ESCAPE does not really close any tootips/overlays, but rather inserts a space into the source-file... what's worse is that it really looks like a space but isn't, so it creates really cryptic compile errors.