0049)fullfunc.html?xmlfile=boatem -->

File: Boat.em

Description: Functions for manipulating Multi Boat objects.
Last Modified: 3/27/2003

BoatFromItem( item )
Parameters:
Name | Type
item | Item Ref
Explanation
if you have an itemref referring to a boat (typically in a doubleclick script) this will convert it into a boatref.
Note that this should not be necessary anymore.
Return values
Boat Reference
Errors
"Item wasn't a multi"
"Multi wasn't a boat"
"Invalid parameter type."
Related
Boat
Item

MoveBoat( boat, facing )
Parameters:
Name | Type
boat | Boat Reference
facing | Integer (0..7)
Explanation
Moves a boat in the direction of an absolute facing
0=N, 1=NE, 2=E, 3=SE, 4=S, 5=SW, 6=W, 7=NW
Return values
1 always
Errors
none (returns 0 on invalid param)
Related
Boat

MoveBoatRelative( boat, direction )
Parameters:
Name | Type
boat | Boat Reference
facing | Integer (0..7)
Explanation
Move a boat in the direction of a relative facing. Same as MoveBoat, but adjusted for boat's facing.
If boat faces East, 0 will move E, 1 will move SE, etc.
Return values
1 always
Errors
none (returns 0 on invalid param)
Related
Boat

MoveBoatXY( boat, x, y )
Parameters:
Name | Type
boat | Boat Reference
x | Integer world coordinate
y | Integer world coordinate
Explanation
Moves a boat to the specified world coordinates.
Careful moving close to the world edge where a part of the boat might be out of bounds.
Return values
1 on success, 0 on failure
Errors
Invalid Parameter
Related
Boat

RegisterItemWithBoat( boat, item )
Parameters:
Name | Type
boat | Boat Reference
item | Item Reference)
Explanation
'registering' an item with a boat causes the boat to move the item when it moves, if and only if the item is still on the boat.
Return values
1 always
Errors
none (returns 0 on invalid param)
Related
Boat
Item

SystemFindBoatBySerial( serial )
Parameters:
Name | Type
serial | Integer
Explanation
given the serial number of a boat, return a boatref that can be used with MoveBoat, TurnBoat, etc.
SystemFindObjectBySerial can find boats as well, should use that.
Return values
Boat Reference on success
Errors
"Boat not found."
Related
Boat

TurnBoat( boat, direction )
Parameters:
Name | Type
boat | Boat Reference
direction | Integer (0..3)
Explanation
Turn a boat in a direction, relative to its current directon.
direction is 0=none, 1=right, 2=flip, 3=left
Return values
true/false if the boat could be turned (i.e. wouldn't be in an invalid location after the turn)
Errors
"Invalid Parameter type"
Related
Boat

If you know if any information is incorrect on these pages, mail your corrections to racalac@burdell.org

Copyright ©2003 David Carpman, all rights reserved. DO NOT REPRODUCE, MIRROR, ALTER, SPINDLE, MUTILATE, OR SIT ON.