XaiJu
Renpytom
Renpytom

patreon


Three Creator-Defined Statements

While the biggest new feature coming in Ren’Py 7.3 is the new support for the HTML5 web platform, one of the other new features is a long-requested revamp of the support for creator-defined statements. In this month’s article, I’ll be showing you how to use this new support to add three new statements to Ren’Py - - a random statement that randomly picks one of its children to run; a cycle statement that cycles through its children in order, and a blockstatement that groups multiple statements together.

Three Creator-Defined Statements

Comments

I didn't know it was possible to experience the uncanny valley via looking at a car

Mystery Corgi

I hope it's not too much to ask for an example? >-<;; I don't have an idea how to proceed.. should I change the script of the game, or do I change the actual random/cycles code itself?

amari

Not in this, but it would be pretty easy to combine random and cycle into a single statement.

Renpytom

Wow this is amazing! I've been wanting to implement "random" into my projects for such a long time! Is there's a function for random where an entry gets discarded once it's already seen? The cycles is a bit too structured, but I would love it if the player gets a different choice each time random is ran!

amari

Yes.

Renpytom

OH MY GOD THIS IS GOING TO SAVE SO MUCH TIME

Aleema

With Cycle, is it possible to have: cycle events: jump event1 jump event2 jump event3

Adam

These new statements are pretty cool, i can immediately see a lot of use for random and block and to a lesser extent cycle too. Anyway look forward to using these in 7.3

Adam

I am disturbed by it's very existence.

Renpytom

I am disturbed by the eyelashes.

Mystery Corgi


More Creators