Three Creator-Defined Statements
🕑 Added 2019-05-30 22:33:11 +0000 UTCWhile 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.
Comments
Mystery Corgi
I didn't know it was possible to experience the uncanny valley via looking at a car
amari
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?
Renpytom
Not in this, but it would be pretty easy to combine random and cycle into a single statement.
amari
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!
Renpytom
Yes.
Aleema
OH MY GOD THIS IS GOING TO SAVE SO MUCH TIME
Adam
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
Renpytom
I am disturbed by it's very existence.
Mystery Corgi
I am disturbed by the eyelashes.