IceBlinkScript.rar
- (1.84 MiB) Downloaded 681 times
Next, place the "IceBlinkScript" folder into your Visual Studio 2010/Projects folder. Open the IceBlinkScript folder and double click on the IceBlinkScript.sln file which should open the Project in VS. Next you will need to add a class to the editor for editing. I tend to copy an existing file, rename it to something else and then open it in the editor. We will use a pre-existing (the "say_hi.cs" script) one and just edit it as needed. First, right click on the "IceBlinkScript" project in the upper right of the Solution Explorer. Then highlight the "Add" item and then click on the "Existing Item..."
- Capture3.JPG (103.48 KiB) Viewed 7695 times
Choose the "say_hi.cs" file and open it. It will be added to the Solution Explorer, so now just double click on it to open it.
- Capture4.JPG (77.39 KiB) Viewed 7694 times
This script can now be edited. If everything was setup properly, Intellisense should be working. We can check this by typing "sf" and then hitting the period key. A pop-up box should appear with all the functions and properties available in the ScriptFunctions class ("sf" was the object instance name I gave for the game engine's instance of the ScriptFunctions class).
- Capture5.JPG (43.55 KiB) Viewed 7694 times
Next, if you choose one of the items in the list, for example "SetGlobalInt", it will fill that into the editor. Next hit the "(" key and then a tooltip will show up with information about the needed parameter inputs for the function.
- Capture6.JPG (37.51 KiB) Viewed 7694 times
Intellisense will help ensure that you use proper syntax, shows you what is available and it automatically completes alot of the coding. It is a must use tool for writting scripts for IceBlink.

Once you finish your script, save it by hitting the save button (the little disk icon). Make sure to remove the "say_hi.cs" file from the Solution Explorer before opening adding another file to the Project. This is done by right clicking on "say_hi.cs" in the Solution Explorer and selecting "Exclude From project". This will remove the file from the project, but don't worry, it will not delete the file from your folder. Classes can not share the same name in one project and since all IceBlink scripts use the same class name "IceBlinkScript", only one can be attached to the project at a time. If you try and have more than one, you will get an error when you try to use the "build solution" function (under Build/Build Solution menu item). Clicking on build soluiton (or F6) will test your script for any syntax or other issues.
That's it for now...more later