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
The PK Girl
Emily
the virtual human
Ghost Town
Top Hat
Give Me your Lunch Money 2010
The Fortress of Fear
Jacaranda Jim
The Spectre of Castle Coris
Die Feuerfaust
 
Latest Forum Posts
What are you working on in 2017
How important are puzzles?
Beginner's Game Competition
Bad Expression...yet still outputs properly
Object hyperlinks and contextual menu - How To?
Happy birthday Lazzah
2016 Adrift End of the Year Comp. + vote
Livingroom / living room ... Why?
How old were you?
Where's Campbell?
 
Latest Reviews
The Lost Children
The Fortress of Fear
The Warlord, The Princess & The Bulldog
Die Feuerfaust
The Spectre of Castle Coris
The Dragon Diamond
The Axe of Kolt
Greek School Adventure
All Through the Night
Ghost Town

Make a donation

Get it from CNET Download.com!
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