Discuss how to use the Ren'Py engine to create visual novels and story-based games. New releases are announced in this section.
Forum rules
This is the right place for Ren'Py help. Please ask one question per thread, use a descriptive subject like 'NotFound error in option.rpy' , and include all the relevant information - especially any relevant code and traceback messages. Use the code tag to format scripts.
-
rinrin
- Veteran
- Posts: 211
- Joined: Thu Apr 16, 2009 9:18 am
- Completed: Several.
- Projects: Several.
-
Contact:
#1
Post
by rinrin » Thu Mar 14, 2013 9:51 am
Can sounds be declared (like images are)?
Since
Code: Select all
image imagename = "location/of/image.png"
lets you work with "imagename" from then on, I thought something like
Code: Select all
sound soundname = "location/of/sound.ogg"
would work in a similar way, but it doesn't. Is there a way to do something like that? Having to use full file paths everywhere is getting very impractical.
Last edited by
rinrin on Thu Mar 14, 2013 1:09 pm, edited 1 time in total.
-
DragoonHP
- Miko-Class Veteran
- Posts: 758
- Joined: Tue Jun 22, 2010 12:54 am
- Completed: Christmas
- IRC Nick: DragoonHP
- Location: Zion Island, Solario
-
Contact:
#2
Post
by DragoonHP » Thu Mar 14, 2013 10:27 am
You can do something like this:
Code: Select all
define soundName = "path to sound file"
or
Code: Select all
$ soundName = "path to sound file"
-
rinrin
- Veteran
- Posts: 211
- Joined: Thu Apr 16, 2009 9:18 am
- Completed: Several.
- Projects: Several.
-
Contact:
#4
Post
by rinrin » Thu Mar 14, 2013 1:08 pm
Thank you!
Code: Select all
define soundName = "path to sound file"
worked!
Code: Select all
$ soundName = "path to sound file"
didn't (not sure why).
Anyway, problem solved.
-
rinrin
- Veteran
- Posts: 211
- Joined: Thu Apr 16, 2009 9:18 am
- Completed: Several.
- Projects: Several.
-
Contact:
#5
Post
by rinrin » Thu Mar 14, 2013 1:10 pm
That's an interesting idea! I might try that next.
Users browsing this forum: Bing [Bot]