error:
Code: Select all
File "game/script.rpy", line 7: invalid syntax
define base = "base.png"
Code: Select all
# You can place the script of your game in this file.
init python:
dressup_button_show = False
hair= 1 # default dressup items
hair_styles_num= 6 # number of styles (files) for each dressup item
# define images as:
define base= "base.png"
define hair1= "hair1.png"
define hair2= "hair2.png"
define hair3= "hair3.png"
define hair4= "hair4.png"
define hair5= "hair5.png"
define hair6= "hair6.png"
def draw_char(st, at): # combine the dressup items into one displayable
return LiveComposite(
(361, 702), # image size
(0, 0), "base.png",
(0, 0), "hair%d.png"%hair,
),.1
def draw_char_side(st, at): # same thing as above, just scaled and positioned for the sideimage; there's probably more elegant solution than this...
return LiveComposite(
(361, 702),
(10, 550), im.FactorScale("base.png", .45, .45),
(10, 550), im.FactorScale("hair%d.png"%hair, .45, .45),
),.1
init:
image char = DynamicDisplayable(draw_char) # using DynamicDisplayable ensures that any changes are visible immedietly
$ character = Character('player', color="#c8ffc8", window_left_padding=180, show_side_image=DynamicDisplayable(draw_char_side))
# Declare images below this line, using the image statement.
image mainmenu = "hypnotic_student.png"
image ctc_animation = Animation("ctcarrow01.png", 0.2, "ctcarrow02.png", 0.2, xalign=0.9, yalign=0.9)
# Declare characters used by this game.
define story = Character(None, kind = nvl, ctc = None)
define player = Character("[playername]")
# The game starts here.
label splashscreen:
scene black
$ renpy.pause(1)
show text "The following story is a work of fiction and contain fantasy situations and does not reflect hypnosis in real life" with dissolve
$ renpy.pause(2)
hide text with dissolve
$renpy.pause(1)
$ renpy.pause(1)
show text "AmatureManga Productions Presents\na story by: AmatureManga and Art by: SilverKazeNinja" with dissolve ## fix
$ renpy.pause(2)
play music "Metaphysik.mp3"
hide text with dissolve
$renpy.pause(2)
return ## fix
label start:
label dressup:
show char:
xpos 250
python:
# display the arrows for changing the dress:
y = 50
ui.imagebutton("arrowL.png", "arrowL.png", clicked=ui.returns("hairL"), ypos=y, xpos=50)
ui.imagebutton("arrowR.png", "arrowR.png", clicked=ui.returns("hairR"), ypos=y, xpos=400)
y += 80
$ picked = ui.interact()
# based on the selection, we increase or decrease the index of the appropriate dress up item
if picked == "hairL":
$ hair -= 1 # previous hair
if picked == "hairR":
$ hair += 1 # next hair
if hair < 1: # making sure we don't get out of index range (index 0 is not allowed)
$ hair = hair_styles_num
if hair > hair_styles_num: # making sure we don't get out of index range (index musn't be bigger than hair_styles_num)
$ hair = 1
$ story = Character(None, ctc="ctc_animation", ctc_position="fixed", kind=nvl)
stop music
with dissolve
window show fade
$ playername = renpy.input("Please enter your character's name below.")
$ playername = playername.strip()
window hide fade
window show fade
story "I am walking down a dark corridor. It is a corridor i am very familiar with."
story "As this is a dream i have almost every night."
story "I can feel the darkness telling every fiber in my body to turn back,"
story "but i know... i know i have to press forward as i reach the familiar corner..."
nvl clear
window hide fade
window show fade
story "I turn the corner and find myself in a familiar dark abandoned room"
nvl clear
window hide fade
return