- Title: 8-Directional RPG Engine
- Description: Text box that types, advances the text with an input, and allows embedded code actions.
- GM Version: GM8
- Registered: No
- File Type: .gmk
- File Size: 125.5 KB
- File Link: http://www.box.net/shared/d7492z4rk4
This is a little walkabout engine I made that comes with basic NPCs, 8-directional walking with running as well with the Shift key, and a text box that types like in Pokemon. But there's a lil twist with the text box: you can insert code into the dialog and have it execute as it's being typed! For example, you could do like Master Roshi does in Dragonball Z Abridged using simple code like this:
say("$object.sprite_index=sprCrunch;%Now it's a Nestle Crunch bar!#$object.sprite_index=sprGummy;%Now it's a gummy bear!#$object.sprite_index=sprNappa;%Now it's Nappa!");
The way this works is simple. The $ represents the start of a code snippet. When this is hit, the txtbox will stop entering text into the display and instead add it into a code string. Then when % is reached, the code is executed, and the text entry goes back to normal. The one drawback is you can't put nested strings into the code because if you use " you have to use ' for the internal string, and vice-versa. Since GM doesn't support \", nesting strings of the same quotation can't be done. An example of this is shown in the tut where a sign will turn a guy into a tree when you talk to it.
The # still acts as a newline character, and the | is a cls character. I think that's all now. I realize the text box's word wrap isn't the best, but the only other version I could find was one where the word was printed and then moved to the next line, which didn't look right to me. I'll work on something better and update later. K, that's all.