concatenating strings #734
Unanswered
Bloustien
asked this question in
Writing in ink
Replies: 1 comment
-
|
I ended up getting around it with these nested functions for now, but I think those concatenated strings could have some interesting uses for procedurally generating a story: |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
I'm writing an adventure with characters and objects that can move from room to room. My problem is I want to be able to create a function where the string used can change dynamically depending on where the character is.
For example:
I realise there are only 3 available string functions, but I've also seen references to concatenating strings. I'm trying to make my programming more efficient, so that I can dynamically change the reference in a single function.
In the above example, I want it to copy this to each room knot so it sets the function (room) query to wStage_stuff, oStage_stuff etc. then describes it. Is this possible in Ink alone?
I had put describeRoom(wStage) ... describeRoom(oStage) etc. for each location knot, as well as a few other functions to be performed whenever you enter a new location, but I'm looking for something more elegant.
Beta Was this translation helpful? Give feedback.
All reactions