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
Ghost Town
Top Hat
Emily
the virtual human
Jacaranda Jim
Give Me your Lunch Money 2010
Trick of Treat
The Fortress of Fear
The Lost Children
 
Latest Forum Posts
Picture recovering program
Happy Birthday David
IFComp 2017 Games Announced
Adrift Sound Error "The File Exists"
Trick or Treat (version 2)
Framework
Twinge - (Facebook Messenger/iOS/Android)
Uploading a (large) finished game
Tingalan
Help with The Tartarus Project
 
Latest Reviews
Trick of Treat
The Last Expedition
The Tartarus Project
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

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