How to handle/design RPG event ???

Started by
19 comments, last by Veron2 23 years, 11 months ago
quote:Original post by CodyVa

How do you do scripts?

like commands maybe
movperson(person, here, there)
Speak(person,string)?
type stuff
with time delays in between?
I dunno.


Scripts can be accomplished through writing a text parser. It goes along a file pointer and just scans the entire file and acts based on what it hits. Later check the string you scanned in against a list of available functions in a 2d-array of chars. Then (usually) you can save just the raw code of the text that was converted into a more compact array of bytes or ints (sort of like machine code) and just cycle through this array when you go to execute the script.

For delays... make a wait function for the script.

___________________________Freeware development:ruinedsoft.com

This topic is closed to new replies.

Advertisement