Cyrem Posted March 18, 2012 Share Posted March 18, 2012 One of the most basic level goals that are used in Rock Raiders is to collect a certain specified amount of crystals. It is important that you know how to compile NPL scripts before doing this tutorial as you will need to compile it at the end for this to work in the game anyway. I recommend using the NPL Scripter to write scripts as it also comes with the compiler. This tutorial shows the very basic code required to do this, no more, no less. We will first begin with the script then I will explain what is happening in it. Script First, open Notepad or NPL Scripter (whatever you want to use) and copy and paste the following script: TRUE ? SetTutorialFlags 0 TRUE ? SetMessagePermit 1 GetCrystalsCurrentlyStored > 20 ? SetLevelCompleted[/CODE] Then save the file. [b]Explanation[/b] The first two lines above appear on nearly all goal scripts. The first line turns off the game tutorial functions and the second line turns on the ability to display level messages. Generally, these level messages are the ones like "A crystal has been found!" etc... That you see in the game on the message panel. Now, the third line is where all the action happens. Converted in to English this line basically says "If Crystals are higher than 20, you have completed the level". To change the required amount of crystals needed to win a level, just alter the "20" to any amount you wish. And that's all there is to it. To use it, compile the script and include it with your level. Thank-you for reading. coolsonic45 1 Link to comment Share on other sites More sharing options...
Recommended Posts