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
Skybreak v. 1.4
The Fortress of Fear
Skybreak v 1.2
Lost Coastlines
The Lost Labyrinth of Lazaitch
the virtual human
The Dwarf of Direwood Forest
Classic Adventure
The Lost Children
Starship Quest
 
Latest Forum Posts
ParserComp 2024 site is up
HAPPY BIRTDAY RoozdenScoot!
Copyright limitations?
Search Function Not Working In Windows 11
errors
Forum site error
The Book of Jax - The Adventures of Alaric Blackmoon # 10
HAPPY BIRTHDAY DazaKiwi
HAPPY BIRTHDAY ralphmerridew
An' anuvver fing....
 
Latest Reviews
Classic Adventure
Private Eye
Roozden's Color Code Module
Wumpus Hunt
Lost Coastlines
The Lost Labyrinth of Lazaitch
October 31st (Post comp.)
The Euripides Enigma
AI
Hint System Library - Release 1

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