How to reload unreal development kit after script change - scripting

i am currently learning unreal scripting. i am creating them on visual studio then compile them in it. I have created a level with the actor i have created.
The problem i have is every time i make changes to the script I am closing the UDK and reopen the level to see the changes.
Is there a way of saying to UDK to reload?

If you make changes to the script, you need to close any instances of UDK.exe, whether game or editor.
Here is a workflow to speed up the whole process by using .bat files to run the game or editor.
Create a text file and rename it to run_game.bat. Inside the file put the following text, adjusting the path to match your project settings:
C:\UDK\Kel\Binaries\Win32\udk.exe Level01
Note that Level01 is the name of your level / map file. This .bat file will run your game within that level.
Next, create another .bat file called run_editor.bat and put this text inside:
C:\UDK\Kel\Binaries\Win32\udk.exe editor Level01
By adding the editor parameter, you're asking to run the editor directly with the desired level.
Copy the two .bat files in C:\Users[Your username] for fast access.
Open the command line by pressing Windows + R, then typing cmd and hitting Enter. Type either run_game or run_editor and hit Enter.
If you have uncompiled code, you'll be asked whether to compile it, so say yes. You will also see any errors or warnings that showed up during compile, which is useful. If everything went well after the compile, press the Up key or type in the name of the .bat you are trying to run, and hit Enter.
Using the above method is also faster because it doesn't require you to compile the scripts in Visual Studio.

Unfortunately, no. Changes to UnrealScript require recompiling the .u file, and the game/editor has to be closed so the file can be deleted and recreated.
I'm not sure from your question if you're saying you're reopening the UDK editor every time you want to see the change, or if you're just reopening the game. If you just want to modify the script, compile, and see the result (without modifying the level), you don't have to reopen the editor. You can just run UDK.exe, press the '~' key to bring up the console, and type open yourlevelname. Or you can create a shortcut that runs UDK.exe yourlevelname to start the game on that level. Of course if you want to spawn in and run around, you'll need to put a PlayerStart in your level.

Related

Running a pre-existing .java

I'm switching from Sublime Text 3 to IntelliJ, I had a test.java file on my desktop that I used for small testing but now I am not able run the same in IntelliJ, the problem is it's not showing the file when I select run.
I tried experimenting with different projects created through IntelliJ and understand that I need to set Project to run the code, but again I don't see the file I want.
Here is the project selection screen
Here is what happens when I hit run
See this answer and this document.
You need to configure the content and source roots inside the Java module.
If you right click on test.java and click "Run 'test'", that will attempt to run your main class. Although you may have a NullPointer exception in your code. When you attempt to access a.get(0), the value will return null as there are no Integers in your ArrayList. Also generally class files are named with uppercase first characters. Hope this helps!

Add options to program's right-click menu

I have a small program that reads a CSV file and outputs it in a different format.
Sometimes I want a different output format so currently I just have another version of the program compiled with slightly different code (it has no GUI, you just click on the exe and it does its job).
Is there a way I can add an option to the context menu of this program to use the different output option, perhaps by running it with a command-line argument?
I mean when right-clicking on the exe file itself, so before it is actually running.
Anything I can find when searching for answers is about editing the shell, via the registry or some other way, however I only want the option to show for this program, not every file in Windows.
Code for the command line that I would be using:
If Environment.GetCommandLineArgs.Count <> 1 Then
If Environment.GetCommandLineArgs(1) = "/output2" Then
'do stuff
End If
End If

IntelliJ - not asking if I want to save a file

I'm new to the IntelliJ IDE. In the past I was working with Visual Studio or Eclipse.
In those IDEs there was an asterisk * above the name of the file which has been modified.
But in IntelliJ with the default configuration I can't see if the file is modified. What's more the file is saved automatically when I change focus to another window.
I've found some options under Settings -> IDE Settings -> General -> Synchronization:
Synchronize files on frame activation
Save files on frame deactivation
Save files automatically if application is idle for...
After unchecking all that options the file is not saved automatically every time I change focus to another window, which is good. But still I can't:
see if the file is modified (no asterisk)
decide if the file should be saved when I'm closing it (IDE doesn't ask for that)
And when I'm closing IntelliJ file which has been modified is saved without even noticing.
Do you know what can I do to change how IntelliJ behaves?
After unchecking mentioned options go to:
Settings/Editor(IDE Settings)/Editor Tabs:
Check "Mark modified tabs with asterisk"
On 2019.3 Ultimate it's under:
Settings/Editor/General/Editor Tabs:
Mark modified (*)
The exact Save feature like eclipse is not available in IntelliJ.
Because IntelliJ IDEA has the ability to change so many files
simultaneously in large refactoring actions, and change them without
ever opening them, single file saves don't make very much sense. In
recognition of this, IntelliJ IDEA reserves the right to save any of
your files literally whenever it wishes. It's actually quite nice to
never have to worry about your file's save statuses, once you get used
to it.
"What if I don't like some changes I made, and want to roll them
back?", I hear you say. Well, for that IntelliJ IDEA includes this
amazing feature called the Local History. Every time it saves your
files, IntelliJ IDEA actually saves a diff of your file from it's
previous state, and saves that as well. You can see the entire edit
history of your files (going back some number of days), see the
changes you've made, and roll back any change. It rules triumphantly,
and more than makes up for the temporary disorientation caused by lack
of single-file save.
https://intellij-support.jetbrains.com/hc/en-us/community/posts/206336279/comments/207351939
To show an asterisk when a file is modified: open Settings (CTRL+ALT+S), switch to Editor > General > Editor Tabs and select the Mark modified tab with asterisk checkbox.
To remove autosave, uncheck: Appearance & Behavior > System Settings > Save files on frame deactivation

How to Run Ada Code in GPS

In GNAT Programming Studio, how do you run the program? I see it compiled successfully, but I do not see where my program has started running. I would like to test it.
First, you have to select your Main procedure in the project properties (see the "main files" tab). You can actually choose multiple files for multiple executables.
Next, you have to build it - either by pressing F4 for the first Main File in the list, or by choosing it in the Build->Project submenu, or by choosing "build all" in the Build->Project submenu (or use the toolbar for the menu entries).
Last, you can choose, which of your Main Files to run by choosing it in the Build->Run menu, or by pressing shift+F2 for the first file in the list. Enter the parameters in the dialog and press OK.
There should be a new Tab next to the Messages panel, where all output is placed, and you can use it for input, too. You could choose to use an external terminal in the run dialog.
If you want to debug it, have a look at the Debug menu. Read the documentation for more information.
Last, you can choose, which of your Main Files to run by choosing it in the Build->Run menu, or by pressing shift+F2 for the first file in the list. Enter the parameters in the dialog and press OK.
Whatever I enter here, e.g. either the name of the project, Primes_Count or the name of what I see to be the 'executable', Primes_Count.o, it just does not run.
And I get this message output on the Messages window :
Could not locate executable on path: Primes_Count.o
I don't see why Ada is making such a big deal out of the Run step.
If there is another stage between making the .o file and a finished Ada executable, then surely it is something that the GPS system can take care of itself . . .
December.
OK now, sorted. The GPS panel governing this [ Project menu > Edit Proj Props > Main Files tab ] setting was blacked out until clicked.
Running available now and working well.
it is Project->Properties-> Main Files add your file to run. This will sort out the issue.

Why does a deleted file reappear in Vista?

I have an automated test running on my program that generates some large MPG files along with other files. After running the test, I have the script clean up after itself. The other files (a mix of binary and text files) are removed with no problems. The MPG files, however, don't get deleted. If I try and manually delete the MPG files from explorer after the test has run, they are removed from the explorer window only to reappear a few seconds later. Process explorer shows that they are being used by explorer.exe. Eventually, I am able to remove these files. Any idea why this is happening?
Is it possible that Explorer is holding onto the files to generate thumbs.db and perform its other work? I ask that because I've noticed considerable lag as Explorer evaluates every movie file in my media directories, even when in Details view. (You can tell, because the address bar of that Explorer window will become a progress bar, slowly -- ever so slowly on my box at home -- turning green.)
Is this behavior still exhibited if no Explorer windows are open to the appropriate directory?
It sounds like something is still hanging on to a reference to the file. Is it possilbe that you have shadow copy set up and it is trying to archive the file?