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
Marika the Offering
The Axe of Kolt
The Book Of Jax
Lost Coastlines
Skybreak v 1.2
The Lost Labyrinth of Lazaitch
The Fortress of Fear
Skybreak v. 1.4
Top Hat
Algernon's Conundrum
 
Latest Forum Posts
New ADRIFT 5 Game - THE LOST LABYRINTH OF LAZAITCH
Password Cracking
Object name autocapitalized when task run
D-Day
Happy birthday, Rotter
Text Adventure Literacy Jam 2025
People's Champion Tournament
HAPPY NEWYEAR
Crazy Commands
Merry Christmas everyone
 
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  User Functions

Issue Type: Status: Priority: Date Submitted: Votes:
Enhancement Completed High Fri 12th Oct 2012 2 votes Vote Up Vote Down
 
Found in version: Last Updated: Completed in version: Date Completed: Track Changes:
5.0.25 Mon 19th Aug 2013 5.0.31 Mon 19th Aug 2013 Log In
 
saabieFri 12th Oct 2012 07:40
This idea is for user defined functions which the writer can then use in expressions and text boxes in the same way as the pre-defined functions.
The "Run this task when" dropdown of a system task would have the new option "used as a function" which would allow the task name to act as a function name.
If the task is called "Player held count" then it can be run by using the function name %PlayerHeldCount%
The task actions would be run and then the "Message to display on completion" would be returned as the result of the function.
If a restriction fails then the restriction message will be returned instead.

This is useful for:
1. For those writers who find expressions too complicated, one of us could create a library module that provides simplified functions like %PlayerHeldCount% that look just like variables.

2. For language translations, ADRIFT could use user functions in the standard library to provide all of the system messages such as when it displays a list of objects.
(The "iterating through lists" enhancement request or something similar would be needed to print each item separated by comma's with an "and" or "or" at the end). It would then be possible to create a version of the standard library that was completely translated into another language.

3. I currently have a task which converts an integer into a fixed-point output so i can display 1263 cents as $12.63, but it is very messy to use as i have to execute several actions every time i need to print a value, and often have to separate one task into 2 or more.
If it was made a user function then i could just use %DollarsAndCents% to display it.

Parameters:
If the task had "%object% %number%" as references then the function could have parameters like %MyFunction[Player, 16]%
 
campbellThu 18th Oct 2012 00:50
This was listed as http://www.adrift.co/cgi/adrift.cgi?page=bug&bugid=181 but you have much more info here, so will close the other item.
 
campbellMon 19th Aug 2013 23:33
Perhaps everything isn't covered in the above list, but User Functions have now been implemented. I suggest creating new items for further enhancement requests.
© 2013 Campbell Wild. All rights reserved. | Contact the Webmaster