function list

This is a moderated forum that collects tutorials, guides, and references for creating Transcendence extensions and scripts.
User avatar
Betelgeuse
Fleet Officer
Fleet Officer
Posts: 1920
Joined: Sun Mar 05, 2006 6:31 am

Name:
scrGetCounter

Syntax:
(scrGetCounter screen)

Argument List:
screen: The screen you want to get the counter from.

Returns:
number: The currently displayed counters value.

Category:
screen, input

Description:
Returns what the counter is currently displaying.

Example:

Comment:
Allows you to get a number inputted by the player.
Crying is not a proper retort!
User avatar
Betelgeuse
Fleet Officer
Fleet Officer
Posts: 1920
Joined: Sun Mar 05, 2006 6:31 am

Name:
scrGetInputText

Syntax:
(scrGetInputText screen)

Argument List:
screen: The screen you want to get the input text from.

Returns:
string: The currently inputted text.

Category:
screen, input

Description:
Returns what the text the player inputted.

Example:

Comment:
Allows you to get a string inputted by the player.
Crying is not a proper retort!
User avatar
Betelgeuse
Fleet Officer
Fleet Officer
Posts: 1920
Joined: Sun Mar 05, 2006 6:31 am

Name:
scrGetItem

Syntax:
(scrGetItem screen)

Argument List:
screen: The screen you want to get the currently selected item from.

Returns:
itemStruct: The currently selected item.

Category:
screen, input

Description:
Returns the currently selected item.

Example:

Comment:
Allows you to get an item selected by the player or the currently selected item by the Initialize element. The Initialize element iterates over every item before they are displayed to the player allowing you to make descriptions, adjust prices, or anything you would need to do for it to display quickly.
Crying is not a proper retort!
User avatar
Betelgeuse
Fleet Officer
Fleet Officer
Posts: 1920
Joined: Sun Mar 05, 2006 6:31 am

Name:
scrGetItemListCursor

Syntax:
(scrGetItemListCursor screen)

Argument List:
screen: The screen you want to get the currently selected cursor from.

Returns:
itemListCursor: The currently selected list cursor.

Category:
screen, input

Description:
Returns the a pointer to where in the list that is being currently selected.

Example:

Comment:
Old function used mostly by old functions. Can not be saved. Use scrGetItem or scrGetListEntry whenever possible.
Crying is not a proper retort!
User avatar
Betelgeuse
Fleet Officer
Fleet Officer
Posts: 1920
Joined: Sun Mar 05, 2006 6:31 am

Name:
scrIsFirstOnInit

Syntax:
(scrIsFirstOnInit screen)

Argument List:
screen: The screen you want to see if it is the first screen the player sees.

Returns:
condition: True if the screen is the first one the player sees.

Category:
screen

Description:
Returns if the screen is the first screen the player sees.

Example:

Comment:
I am not quite sure of the cases for this one. Anyone want to investigate?
Crying is not a proper retort!
User avatar
Betelgeuse
Fleet Officer
Fleet Officer
Posts: 1920
Joined: Sun Mar 05, 2006 6:31 am

Name:
scrRemoveitem

Syntax:
(scrRemoveitem screen number)

Argument List:
screen: The screen you want to remove the item from.
number: How many of the item you want to remove.

Returns:
itemStruct: The removed items.

Category:
screen

Description:
Removes and returns the number of the currently selected items from the screen and whatever is using that screen. (the player ship in every case I can think of)

Example:

Comment:
Very useful in screens where you can "use" up items like buying or looting.
Last edited by Betelgeuse on Sat Jan 19, 2008 2:07 am, edited 1 time in total.
Crying is not a proper retort!
User avatar
Betelgeuse
Fleet Officer
Fleet Officer
Posts: 1920
Joined: Sun Mar 05, 2006 6:31 am

Name:
scrSetActionLabel

Syntax:
(scrSetActionLabel screen number string)

Argument List:
screen: The screen you want to change the action text on.
number: How far from the top starting at 0 the action is.
string: What you want to change the text too.

Returns:
condition: True is successful.

Category:
screen

Description:
Changes the given actions text to the string.

Example:

Comment:
Allows you to dynamically change the action labels.
Last edited by Betelgeuse on Sat Jan 19, 2008 2:07 am, edited 1 time in total.
Crying is not a proper retort!
User avatar
Betelgeuse
Fleet Officer
Fleet Officer
Posts: 1920
Joined: Sun Mar 05, 2006 6:31 am

Name:
scrSetCounter

Syntax:
(scrSetCounter screen number)

Argument List:
screen: The screen you want to set the counter on.
number: The number you want to set the counter too.

Returns:
condition: True is successful.

Category:
screen, input

Description:
Sets the counter on the screen to the given number.

Example:

Comment:
Allows you to set a counter. Useful in making sure the counter has limits or setting an initial value.
Last edited by Betelgeuse on Sun Jan 20, 2008 1:44 am, edited 1 time in total.
Crying is not a proper retort!
User avatar
Betelgeuse
Fleet Officer
Fleet Officer
Posts: 1920
Joined: Sun Mar 05, 2006 6:31 am

Name:
scrSetDesc

Syntax:
(scrSetDesc screen string)

Argument List:
screen: The screen you want to set the description on.
string: The string you want to set the description too.

Returns:
condition: True is successful.

Category:
screen

Description:
Sets the description text of the screen to the given string.

Example:

Comment:
Basic screen function. Will most likely be used on any screen due to it being the only way of displaying general text.
Crying is not a proper retort!
User avatar
Betelgeuse
Fleet Officer
Fleet Officer
Posts: 1920
Joined: Sun Mar 05, 2006 6:31 am

Name:
scrSetInputText

Syntax:
(scrSetInputText screen string)

Argument List:
screen: The screen you want to set the input text on.
string: The string you want to set the input text too.

Returns:
condition: True is successful.

Category:
screen

Description:
Sets the input text on the screen to the given string.

Example:

Comment:
Useful in having an initial string for text input. Not used in the current xmls.
Crying is not a proper retort!
User avatar
Betelgeuse
Fleet Officer
Fleet Officer
Posts: 1920
Joined: Sun Mar 05, 2006 6:31 am

Name:
scrSetListFilter

Syntax:
(scrSetListFilter screen criteria)

Argument List:
screen: The screen you want to filter the items on.
criteria: The criteria string you want to filter the item list with.

Returns:
condition: True is successful.

Category:
screen

Description:
Sets the list filter from the given screen. Will only display the items that fit the criteria.

Example:

Code: Select all

(scrSetListFilter gScreen "*U")
The current screen lists all the non equipped items.

Comment:
Very helpful in filtering item selection screens like loot screens.
Last edited by Betelgeuse on Sat Jan 19, 2008 2:07 am, edited 1 time in total.
Crying is not a proper retort!
User avatar
Betelgeuse
Fleet Officer
Fleet Officer
Posts: 1920
Joined: Sun Mar 05, 2006 6:31 am

Name:
scrShowPane

Syntax:
(scrShowPane screen string)

Argument List:
screen: The current screen.
string: The name of the pane you want to navigate to.

Returns:
condition: True is successful.

Category:
screen

Description:
Navigates to the named pane.

Example:

Code: Select all

(scrShowPane gScreen "GoodLuck")
Navigates to the pane named GoodLuck.

Comment:
Basic screen function allowing you to go between panes.
Crying is not a proper retort!
User avatar
Betelgeuse
Fleet Officer
Fleet Officer
Posts: 1920
Joined: Sun Mar 05, 2006 6:31 am

Name:
scrShowScreen

Syntax:
(scrShowScreen screen string)

Argument List:
screen: The current screen.
string: The name of the screen you want to navigate to.

Returns:
condition: True is successful.

Category:
screen

Description:
Navigates to the named screen.

Example:

Code: Select all

(scrShowScreen gScreen "Introduction")
Navigates to the screen named Introduction.

Comment:
Basic screen function allowing you to go between screens.
Crying is not a proper retort!
User avatar
Betelgeuse
Fleet Officer
Fleet Officer
Posts: 1920
Joined: Sun Mar 05, 2006 6:31 am

Name:
set

Syntax:
(set string expression)

Argument List:
string: The name of the variable you want to set.
expression: The thing you want to store in the variable.

Returns:
expression: Whatever the expression is.

Category:
store

Description:
Stores the expression in the variable named by the string.

Example:

Code: Select all

(set "notFound" True)
Stores True in the variable notfound.

Comment:
Not used in the xml due to setq being faster. Only needed if you want to mess with the variable names.
Crying is not a proper retort!
User avatar
Betelgeuse
Fleet Officer
Fleet Officer
Posts: 1920
Joined: Sun Mar 05, 2006 6:31 am

Name:
setq

Syntax:
(setq variable expression)

Argument List:
variable: The variable you want to set.
expression: The thing you want to store in the variable.

Returns:
expression: Whatever the expression is.

Category:
store

Description:
Stores the expression in the variable.

Example:

Code: Select all

(setq notFound True)
Stores True in the variable notfound.

Comment:
Used almost 2k times in the xml. Even the trivial code uses this.
Crying is not a proper retort!
Post Reply