Create your own Interactive Fiction

ADRIFT - Interactive Fiction  
Home   |   News ADRIFT News RSS   |   Screenshots   |   Download   |   Games ADRIFT Reviews RSS   |   Forum   |   Help   |   Links
Welcome Guest Register | Login
Popular Games
Pete's Punkin Junkinator
InsideADRIFT #41
All Through the Night
Three Monkeys One Cage
Skybreak v. 1.4
Trick or Treat
The Fortress of Fear
Bug Hunt On Menelaus
Museum Heist
The Day Program
 
Latest Forum Posts
Getting Adrift 4 to ignore "and"
Happy birthday, Rotter
CYS New Year's Prompt contest
Text Adventure Literacy Jam 2026
Merry Christmas!
Short story contest for the forum?
Constellaris Court
Happy birthday reelyor
New Game Uploaded: THINGS THAT GO BUMP IN THE NIGHT
Dominion of Darkness - interactive story of the Dark Lord/Lady
 
Latest Reviews
DRAM 321 Final
Goldilocks is a FOX!
Xanix - Xixon Resurgence
Finn's Big Adventure
Bug Hunt On Menelaus
Magor Investigates...
Classic Adventure
Private Eye
Roozden's Color Code Module
Wumpus Hunt

Make a donation

Cursor  Allow Developer to use variables in the FOR Loops

Issue Type: Status: Priority: Date Submitted: Votes:
Enhancement Open Medium Thu 5th Jan 2012 5 votes Vote Up Vote Down
 
Found in version: Last Updated: Completed in version: Date Completed: Track Changes:
5.0.22 Sat 30th Jan 2016 Log In
 
ElliotMThu 5th Jan 2012 23:19
FOR loops have three fields, two for integer numbers, and one for an expression for what to set the current array index to. I would like to use variables in the first two fields for a project I'm working on, so I can access different ranges of the array I'm working with.

Variables currently resolve to zero when I put them in either of those first two fields.
 
saabieSat 30th Jan 2016 11:50
Loops (both for array indexes and for executing tasks multiple times) would be much more useful with this enhancement.
If you could use a %number% reference then the player could say "take 5 objects from the bag" and you could run a "take random object from bag" task 5 times.
If you could use %object%.Contents.Count then you could do one loop for each object inside %object%.
It should allow a full expression so you could for example find the difference between the number of objects carried and the number of items that they are allowed to carry and remove the excess items.
© 2013 Campbell Wild. All rights reserved. | Contact the Webmaster