Pezna Story Engine: Update 2 – Events and While-loops


This is something I’ve been putting on the back burner for a while, but today I decided I would finally implement this into PSE. You can use events to alert your game if an important action needs to occur. For example, if you want a transition after a line is displayed, you could do something like this:

line: person "Hello, World!"
event "transition 1"
# or, if a variable (string, number, boolean) has been initialized
# you can send its value with the event
event variableName


The problem  I had in the previous update with a stack overflow error has been fixed with the introduction of while-loops.

line: person "I will count to 10!"
while (var <= 10):
    var += 1
    line: person var+"!"
end while
Using events and a while-loop in PSE.

Using events and a while-loop in PSE.

Be sure to follow me on twitter: @pezna_official

Leave a Reply

Your email address will not be published. Required fields are marked *