function list

This is a moderated forum that collects tutorials, guides, and references for creating Transcendence extensions and scripts.
Desolator
Commonwealth Pilot
Commonwealth Pilot
Posts: 73
Joined: Tue Dec 18, 2007 6:31 pm
Location: Romania

CAN'T YOU USE A SIMPLE HTML PAGE FOR THIS?!?

Thank you :P
User avatar
Betelgeuse
Fleet Officer
Fleet Officer
Posts: 1920
Joined: Sun Mar 05, 2006 6:31 am

nope :lol:
but something is being worked on to make it look nice. Just putting them here for a simple format that everyone has access to for now.
Crying is not a proper retort!
Desolator
Commonwealth Pilot
Commonwealth Pilot
Posts: 73
Joined: Tue Dec 18, 2007 6:31 pm
Location: Romania

I bet it would be easier to use OpenOffice.org to export to PDF >.>

BTW, I missed your PM so I didn't come to the channel. But...on which server? we have on OFTC & Freenode :lol:
User avatar
Betelgeuse
Fleet Officer
Fleet Officer
Posts: 1920
Joined: Sun Mar 05, 2006 6:31 am

a pdf version of this would be helpful it wouldn't have the niceties of the site (searching and comments) but still would be useful. I am open to making more than one version :D

ps: I am also going the document all the elements in the xml after I get done with the functions.
Crying is not a proper retort!
User avatar
Betelgeuse
Fleet Officer
Fleet Officer
Posts: 1920
Joined: Sun Mar 05, 2006 6:31 am

Name:
objGetBuyPrice

Syntax:
(objGetBuyPrice spaceObject itemStruct)

Argument List:
spaceObject: The space object that you want to get the buying price of.
itemStruct: The itemStruct of the item that you want to get the price of.

Returns:
number: The amount that this space object will sell the item for.

Category:
item, spaceObject

Description:
Finds the cost it would cost to buy the item from the space object and returns it.

Example:

Code: Select all

(objGetBuyPrice gSource (itmCreate 0x4001 1))
Returns the price of a light titanium armor for the calling object.

Comment:
For the gplayership returns Nil. Also remember the buy in it means from the players point of view not the spaceobjects.
Crying is not a proper retort!
User avatar
Betelgeuse
Fleet Officer
Fleet Officer
Posts: 1920
Joined: Sun Mar 05, 2006 6:31 am

Name:
objGetCargoSpaceLeft

Syntax:
(objGetCargoSpaceLeft spaceObject)

Argument List:
spaceObject: The space object that you want to get the cargo space left of.

Returns:
number: The amount of space left in the cargo bay.

Category:
spaceObject

Description:
Returns the amount of cargo space left in the space object.

Example:

Code: Select all

(objGetCargoSpaceLeft gplayerShip)
Returns the amount of space left in the players ship.

Comment:
Only useful for things with cargo capacities only player ships have that so far.
Crying is not a proper retort!
User avatar
Betelgeuse
Fleet Officer
Fleet Officer
Posts: 1920
Joined: Sun Mar 05, 2006 6:31 am

Name:
objGetCombatPower

Syntax:
(objGetCombatPower spaceObject)

Argument List:
spaceObject: The space object that you want to get the combat power of.

Returns:
number: A number between 1 and 100 representing the combat power of the space object.

Category:
spaceObject

Description:
Returns the combat power the space object.

Example:

Comment:
I am not sure how this is calculated.
Crying is not a proper retort!
User avatar
Betelgeuse
Fleet Officer
Fleet Officer
Posts: 1920
Joined: Sun Mar 05, 2006 6:31 am

Name:
objGetDamageType

Syntax:
(objGetDamageType object)

Argument List:
object: The thing you want to know the damage type of.

Returns:
number: The damage type.

Category:
misc

Description:
Returns the damage type of the object.

Example:

Comment:
Used with aDestroyer in OnDestroy. What other circumstances it can be used are unknown to me.
Crying is not a proper retort!
george moromisato
Developer
Developer
Posts: 2998
Joined: Thu Jul 24, 2003 9:53 pm
Contact:

Sticky!
User avatar
Betelgeuse
Fleet Officer
Fleet Officer
Posts: 1920
Joined: Sun Mar 05, 2006 6:31 am

I see someone found a new toy. :wink:
Thanks for the sticky.
Crying is not a proper retort!
User avatar
Betelgeuse
Fleet Officer
Fleet Officer
Posts: 1920
Joined: Sun Mar 05, 2006 6:31 am

Name:
objGetData

Syntax:
(objGetData spaceObject string)

Argument List:
spaceObject: The space object you want the data from.
string: The name of the data you want.

Returns:
The data named by the string from the space object. Returns Nil if there is no data as named by the string.

Category:
spaceObject, data

Description:
Returns the data named by the string for the space object.

Example:

Code: Select all

(objGetData gPlayerShip "rins")
Returns the rins from the players ship. This is how the game handles rins.

Comment:
Very useful in getting information stored on an space object from code. If you want data from the xml look at the function objGetStaticData.
Last edited by Betelgeuse on Fri Jan 18, 2008 11:07 pm, 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:
objGetDestiny

Syntax:
(objGetDestiny spaceObject)

Argument List:
spaceObject: The space object you want the destiny of.

Returns:
number: A number from 0 to 359

Category:
spaceObject

Description:
Returns the destiny code of the space object.

Example:

Comment:
I am not sure what the destiny refers to.
Last edited by Betelgeuse on Fri Jan 18, 2008 11:08 pm, 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:
objGetDistance

Syntax:
(objGetDistance spaceObject spaceObject)

Argument List:
spaceObject: The space object you want to find the distance from.
spaceObject: The space object you want to find the distance to.

Returns:
number: The distance between the two space objects.

Category:
spaceObject

Description:
Returns the distance between the two space objects.

Example:

Code: Select all

(objGetDistance gPlayerShip gsource)
Returns the distance between the calling space object and the player ship.

Comment:
Helpful little function if you want something to happen only when the player is close enough.
Last edited by Betelgeuse on Fri Jan 18, 2008 11:08 pm, 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:
objGetGlobalData

Syntax:
(objGetGlobalData spaceObject string)

Argument List:
spaceObject: The space object belonging to the class you want the data from.
string: The name of the data you want.

Returns:
The data named by the string from the space objects class. All space objects in the same class share the same global data. Returns Nil if there is no data as named by the string.

Category:
spaceObject, data

Description:
Returns the data named by the string for the space objects class.

Example:

Comment:
Basicly the same as objGetData except all space object in the same class share the same data.
Crying is not a proper retort!
User avatar
Betelgeuse
Fleet Officer
Fleet Officer
Posts: 1920
Joined: Sun Mar 05, 2006 6:31 am

Name:
objGetID

Syntax:
(objGetID spaceObject)

Argument List:
spaceObject: The space object you want to find the ID of.

Returns:
number: The ID of the space object.

Category:
spaceObject

Description:
Returns the ID of the space object.

Example:

Comment:
This isn't the UNID. The function isn't used in the xml and I don't see any function that uses it so I can't say how accurate it is.
Crying is not a proper retort!
Post Reply