Home
Software
Forums

Jomho SRPG Editor Tutorials - Basic SRPG Scripting

Now lets talk about one of the really cool parts of the SRPG Editor, the scripting langauge. With the SRPG scripting langauge you can make the NPCs do tons of cool things. Take a look at the picture below.

OK, what I want you to do now is to make a new Ally NPC and call it Bob, capital B. Then type this into the speech area so it looks like the image above. After you are finished click on the area you want "Bob" to move to and then play the game, remember to add player 1 also.

Now try talking to Bob, he will say "Hello!", then try talking to him one more time and he will say "Hello Again!"

Let me explane what just happened. The script <LocalVar.Bob = 2> changes Bob's Local Variable to 2, which is the second line. So next time you talk to him he will say the thing on the second line. But what if we want Bob to say three things, well take a look below.

Is this cool or what, now he will say "Hello!" the first time you talk to him, "Hello again!" the second, and "How are you?" the third, after that he will start all over again.

Ok, as I said, you can do tons of cool stuff with SRPG Script, here is one more example.

If you use this code it will kill Bob after you are done talking to him, and if that's not cool nothing is:) All the script above really mean, <HP.Bob = 0>, set Bob's HP to 0, and we all know what 0 HP is.

If you want to find more function you can click Help>Script Help... and it will bring up a list of all the functions, right now the software is only version 0.85 Beta but I hope to add more in the next version.

next lesson - more advanced SRPG scripting>


©2007 Joseph M. Horsch - All Rights Reserved