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:
objGetVisibleDamage

Syntax:
(objGetVisibleDamage spaceObject)

Argument List:
spaceObject: The space object you want to get the most damaged armor damage percent.

Returns:
number: The percent of damage the most damaged armor on the space object.

Category:
spaceObject

Description:
Returns the percent of damage the most damaged armor on the space object.

Example:

Code: Select all

(objGetVisibleDamage gplayership)
Returns the percent of damage the most damaged armor on the players ship.

Comment:
It would seem that it is almost the same thing as used by the targeting info damage percent.
Crying is not a proper retort!
User avatar
Betelgeuse
Fleet Officer
Fleet Officer
Posts: 1920
Joined: Sun Mar 05, 2006 6:31 am

Name:
objHasAttribute

Syntax:
(objHasAttribute spaceObject string)

Argument List:
spaceObject: The space object you want to see if it has the attribute.
string: The attribute's that you want name.

Returns:
condition: True if the space object has that attribute. Nil otherwise.

Category:
spaceObject, condition query

Description:
Checks to see if the space object has the attribute named by the string.

Example:

Code: Select all

(objHasAttribute gSource "pirates")
Checks to see if the space object has the attribute pirates.

Comment:
Very helpful function if you want to find a certain group of ships/stations.
Crying is not a proper retort!
User avatar
Betelgeuse
Fleet Officer
Fleet Officer
Posts: 1920
Joined: Sun Mar 05, 2006 6:31 am

Name:
objHasItem

Syntax:
(objHasItem spaceObject itemStruct)

Argument List:
spaceObject: The space object you want to see if it has the item.
itemStruct: The itemStruct of the item you want to see if the space object has.

Returns:
condition: True if the space object has that type of item. Nil otherwise.

Category:
spaceObject, condition query

Description:
Checks to see if the space object has the item.

Example:

Code: Select all

(objHasItem gplayership (itmCreate &itPortableAutodoc; 1))
Checks to see if the player ship has an auto doc.

Comment:
Very helpful function so you can have events happen depending on who has what item.
Last edited by Betelgeuse on Sat Jan 19, 2008 10:22 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:
objIncData

Syntax:
(objIncData spaceObject string number)

Argument List:
spaceObject: The space object you want to alter a numerical data in.
string: The name of the data you want to alter.
number: The amount you want to add to the data.

Returns:
True if successful.

Category:
spaceObject

Description:
Adds the number to the data in the space object named by the string.

Example:

Code: Select all

(objIncData gPlayerShip "rins" 100)
Adds 100 rins to the player.

Comment:
Basically a helper function so you don't have to do set and add all the time.
Crying is not a proper retort!
User avatar
Betelgeuse
Fleet Officer
Fleet Officer
Posts: 1920
Joined: Sun Mar 05, 2006 6:31 am

Name:
objIncVel

Syntax:
(objIncVel spaceObject vector)

Argument List:
spaceObject: The space object you want to alter a numerical data in.
vector: The vector you want to change the space object velocity by.

Returns:
vector: I guess it returns the new velocity.

Category:
spaceObject

Description:
Adds the number to the data in the space object named by the string.

Example:

Code: Select all

(objIncVel gPlayerShip (sysVectorPolarOffset Nil 0 10))
Makes the player ship to the right by 10 more.

Comment:
I have no idea on how to make a ship stop in code though.
Crying is not a proper retort!
User avatar
Betelgeuse
Fleet Officer
Fleet Officer
Posts: 1920
Joined: Sun Mar 05, 2006 6:31 am

Name:
objIsAbandoned

Syntax:
(objIsAbandoned spaceObject)

Argument List:
spaceObject: The space object you want to see if it is abandoned.

Returns:
condition: True if the space object is abandoned. Nil otherwise.

Category:
spaceObject, condition query

Description:
Checks to see if the space object is abandoned. (ie has been destroyed)

Example:

Code: Select all

(objIsAbandoned gplayership)
Returns Nil. No time will the player ship be abandoned until the game is over.

Comment:
Basic conditional query for space objects.
Crying is not a proper retort!
User avatar
Betelgeuse
Fleet Officer
Fleet Officer
Posts: 1920
Joined: Sun Mar 05, 2006 6:31 am

Name:
objIsDeviceSlotAvailable

Syntax:
(objIsDeviceSlotAvailable spaceObject)

Argument List:
spaceObject: The space object you want to see if it has a device slot available.

Returns:
condition: True if the space object has a device slot available. Nil otherwise.

Category:
spaceObject, condition query

Description:
Returns if the space object has a device slot available.

Example:

Code: Select all

(objIsDeviceSlotAvailable gplayership)
Returns if the player ship have a device slot available.

Comment:
Basic conditional query for space objects. Device slots are only used for the player ship currently.
Crying is not a proper retort!
User avatar
Betelgeuse
Fleet Officer
Fleet Officer
Posts: 1920
Joined: Sun Mar 05, 2006 6:31 am

Name:
objIsEnemy

Syntax:
(objIsEnemy spaceObject)

Argument List:
spaceObject: The space object you want to see if it is an enemy.

Returns:
condition: True if the space object is an enemy. Nil otherwise.

Category:
spaceObject, condition query

Description:
Returns if the space object is an enemy.

Example:

Code: Select all

(objIsEnemy gplayership)
Returns Nil. (the player isn't there own enemy)

Comment:
Basic conditional query for space objects.
Crying is not a proper retort!
User avatar
Betelgeuse
Fleet Officer
Fleet Officer
Posts: 1920
Joined: Sun Mar 05, 2006 6:31 am

Name:
objIsShip

Syntax:
(objIsShip spaceObject)

Argument List:
spaceObject: The space object you want to see if it is a ship.

Returns:
condition: True if the space object is a ship. Nil otherwise.

Category:
spaceObject, condition query

Description:
Returns if the space object is a ship.

Example:

Code: Select all

(objIsShip gplayership)
Returns True. (the player's ship is a ship)

Comment:
Basic conditional query for space objects.
Crying is not a proper retort!
User avatar
Betelgeuse
Fleet Officer
Fleet Officer
Posts: 1920
Joined: Sun Mar 05, 2006 6:31 am

Name:
objIsUnderAttack

Syntax:
(objIsUnderAttack spaceObject)

Argument List:
spaceObject: The space object you want to see if it is under attack.

Returns:
condition: True if the space object is under attack. Nil otherwise.

Category:
spaceObject, condition query

Description:
Returns if the space object is under attack or not.

Example:

Code: Select all

(objIsUnderAttack gplayership)
Returns weather or not the player ship is under attack.

Comment:
Basic conditional query for space objects.
Crying is not a proper retort!
User avatar
Betelgeuse
Fleet Officer
Fleet Officer
Posts: 1920
Joined: Sun Mar 05, 2006 6:31 am

Name:
objJumpTo

Syntax:
(objJumpTo spaceObject vector)

Argument List:
spaceObject: The space object you want to move.
vector: Where you want to move the space object to.

Returns:
True if successful.

Category:
spaceObject

Description:
Moves the space object to the vector position with a gating animation.

Example:

Code: Select all

(objJumpTo gplayership (sysVectorPolarOffset gplayership (shpGetDirection gplayership) 500))
Moves the player ship 500 forward with an gating animation.

Comment:
Basically the same as objMoveTo except it has an extra gating animation.
Crying is not a proper retort!
User avatar
Betelgeuse
Fleet Officer
Fleet Officer
Posts: 1920
Joined: Sun Mar 05, 2006 6:31 am

Name:
objMakeParalyzed

Syntax:
(objMakeParalyzed spaceObject number)

Argument List:
spaceObject: The space object you want to paralyze.
number: How many ticks you want the space object to be paralyzed.

Returns:
True if successful.

Category:
spaceObject

Description:
Paralyzes a given space object for a given time.

Example:

Code: Select all

(objMakeParalyzed gplayership 100)
Paralyzes the player ship for one hundred ticks.

Comment:
Useful as a punishment or a alternative weapon.
Crying is not a proper retort!
User avatar
Betelgeuse
Fleet Officer
Fleet Officer
Posts: 1920
Joined: Sun Mar 05, 2006 6:31 am

Name:
objLowerShields

Syntax:
(objLowerShields spaceObject)

Argument List:
spaceObject: The space object you want to disable the shields.

Returns:
True if successful.

Category:
spaceObject

Description:
Disables the shields of the space object.

Example:

Code: Select all

(objLowerShields gplayership)
Disables the player ships shields.

Comment:
Not as useful as it could be due to you can't enable shields from in code but still can be fun in disabling the players shield.
Crying is not a proper retort!
User avatar
Betelgeuse
Fleet Officer
Fleet Officer
Posts: 1920
Joined: Sun Mar 05, 2006 6:31 am

Name:
objMoveTo

Syntax:
(objMoveTo spaceObject vector)

Argument List:
spaceObject: The space object you want to move.
vector: Where you want to move the space object to.

Returns:
True if successful.

Category:
spaceObject

Description:
Moves the space object to the vector position.

Example:

Code: Select all

(objMoveTo gplayership (sysVectorPolarOffset gplayership (shpGetDirection gplayership) 500))
Moves the player ship 500 forward.

Comment:
Basically the same as objJumpTo except it doesn't have an extra gating animation.
Crying is not a proper retort!
User avatar
Betelgeuse
Fleet Officer
Fleet Officer
Posts: 1920
Joined: Sun Mar 05, 2006 6:31 am

Name:
objRegisterForEvents

Syntax:
(objRegisterForEvents spaceObject spaceObject)

Argument List:
spaceObject: The space object you want to send the events too.
spaceObject: Where the events are coming from.

Returns:
True if successful.

Category:
spaceObject

Description:
Causes the first space object to receive events generated by second space object.

Example:

Comment:
Used with OnObj events like OnObjDestroyed, OnObjDocked, OnObjJumped, and OnObjEnteredGate.
Last edited by Betelgeuse on Fri Jan 04, 2008 3:03 am, edited 2 times in total.
Crying is not a proper retort!
Post Reply