Permanent sprite change
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.
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.
Permanent sprite change
This is my first foray into ren'py and as I'm plotting out the story I hit a problem. At one point, one of the characters can choose to transform into one of a few forms. My problem is this: is it possible to do this in a way where after the choice I can just call the character and it calls the sprites for the right form automatically? I'm guessing I'll need to use a switch of some sort? Sorry if this sounds confusing, I'm not the best at explaining things. Thank you in advance for any help you can give me.
- vollschauer
- Veteran
- Posts: 231
- Joined: Sun Oct 11, 2015 9:38 am
- Github: vollschauer
- Contact:
Re: Permanent sprite change
Maybe you go with https://www.renpy.org/doc/html/displaya ... tionSwitch ?
- Remix
- Eileen-Class Veteran
- Posts: 1628
- Joined: Tue May 30, 2017 6:10 am
- Completed: None... yet (as I'm still looking for an artist)
- Projects: An un-named anime based trainer game
- Contact:
Re: Permanent sprite change
The easiest is just using DynamicImage with variable interpolation...
Lots easier than using switches if you get into the habit of naming images and variable values appropriately...
Code: Select all
default mc_form = "human"
image mc_sprite = "images/mc_[mc_form].png"
# initially will be 'images/mc_human.png'
label start:
show mc_sprite
"..."
$ mc_form = "vampette"
"..."
$ mc_form = "werebabe"
"..."
Frameworks & Scriptlets:
- Speech Bubble dialogue system
- Multiple Notify with ATL and history
- (WIP) Radial Masking - needs updating to use Shader
- 7.4 - Smooth Tinting using ATL and matrixcolor
- Several other repositories there too
Re: Permanent sprite change
Would this work with expressions? Calling a happy/sad/angry version of the vampette for example.
- vollschauer
- Veteran
- Posts: 231
- Joined: Sun Oct 11, 2015 9:38 am
- Github: vollschauer
- Contact:
Re: Permanent sprite change
I guess you are looking for this one: https://www.renpy.org/doc/html/layeredi ... red-images
Who is online
Users browsing this forum: Google [Bot]