default buy = 0
default applecream = 10
default item = "apple"
default item_status = "cream"
$ buy = [item ]+[item_status]
# become >>>
# buy = applecream
# buy = 10
i know this is not how it work....
but any idea how to code like this ?'
Asking about Variable ?
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.
Re: Asking about Variable ?
Code: Select all
$ buy = getattr(store, item + item_status)
-
- Newbie
- Posts: 1
- Joined: Wed Jan 18, 2023 9:04 am
- Contact:
Re: Asking about Variable ?
Thanks for the code. I will keep it in my mind.
-
- Newbie
- Posts: 4
- Joined: Thu Jan 12, 2023 1:51 am
- Contact:
Re: Asking about Variable ?
Thanks for helping me out as well.
Who is online
Users browsing this forum: Google [Bot]