move insult layers function into misc_definitions

This commit is contained in:
Map 2024-10-01 17:16:18 -05:00
parent d9cb051d91
commit 00166f6d3d
2 changed files with 11 additions and 10 deletions

View file

@ -21,16 +21,6 @@ init -1 python:
mod_menu_access = []
init python:
import random
#function for insult layers
def showCG():
files = ["text1", "text2", "text3", "text4", "text5", "text6", "text7", "text8", "text9"]
length = len(files)
picked = random.randint(0,length - 1)
fileName = files[picked]
renpy.show(fileName, at_list=[randPosition])
# extra music channel so we can do crossfade instead of fadeout followed by fadein
# TODO: function for stopping both channels with optional fadeout so we don't have to keep track of which channel is playing
renpy.music.register_channel("music1","music",True,tight=True)

View file

@ -1,3 +1,14 @@
init python:
# function for insult layers
import random
def showCG():
files = ["text1", "text2", "text3", "text4", "text5", "text6", "text7", "text8", "text9"]
length = len(files)
picked = random.randint(0,length - 1)
fileName = files[picked]
renpy.show(fileName, at_list=[randPosition])
transform randPosition:
alpha 0.0
xalign random.uniform(0.2,0.8)