Twine Version: 2.3.14
Story Format: Harlowe 3.2.2
I am attempting to create a passage which pulls a character’s datamap from the $characters array, modifies some of the values, then feeds the new information back into the original datamap.
The idea is that the player is supposed to choose a target at their discretion, change them, and have it be reflected in the rest of the story. I am able to pull the datamap from the array and assign it to a temporary variable on the page I can modify those values, but I cannot figure out how to feed the new information into the original datamap. Here is the code I’m trying to make work:
(set: _target to (find: _character where _character's name contains $target, ...$characters)) (set:_height to _target's 1st's height, _weight to _target's 1st's weight) You point the Shrink Ray at $target and activate it. As a result, $target is now (if:$metric is true)[10 cm shorter and 5 kg lighter(set:_height to it-10, _weight to it-5)](else:)[5 in shorter and 10 lb lighter(set:_height to it-5, _weight to it-10)] (set: _target to (dm: "name", $target,"height", _height, "weight", _weight))(move: _target into (find: _character where _character's name contains $target, ...$characters)) (link-goto:"Return", $lastPassage)
Is this even possible in Harlowe