Quantcast
Channel: Help! with 2.0 - Twine Forum
Viewing all articles
Browse latest Browse all 1844

[Harlowe] Making characters from a string "leak" into another using string positions and (live:)?

$
0
0
Hey all,
I'm working on a piece about corroding memories and I've managed to get the following working to my liking:
(live: $corruptionspeed)[(put: (either: ...$replacementstring) into $memory03's (random: 1, $memory03's length))]

This is taking a random character from $replacementstring and inserting it randomly into $memory03.

What I'd like to be able to do next is take a random character from $memory02 and place it into the *same position* in $memory03. I've tried a couple variations on the following but it's just not having it:
(live: $corruptionspeed)[(set: $leakposition to (random: 1, $memory02's length))(set: $leakingchar to $memory02's $leakposition)(put: $leakingchar into $memory03's $leakposition)]

I don't seem to be able to use $leakposition as a numerical (e.g. nth) position in a string.
Any ideas?

Viewing all articles
Browse latest Browse all 1844

Trending Articles