Difference between revisions of "Osiris/API/ItemMoveToPosition"

From Divinity Engine Wiki
Jump to: navigation, search
m
m
Line 15: Line 15:
 
* [[Osiris/API/ItemMoveToTrigger|ItemMoveToTrigger]]
 
* [[Osiris/API/ItemMoveToTrigger|ItemMoveToTrigger]]
 
* [[Osiris/API/ItemScatterAt|ItemScatterAt]]
 
* [[Osiris/API/ItemScatterAt|ItemScatterAt]]
 +
* [[Osiris/API/ItemTemplateMoved|ItemTemplateMoved]]
 
* [[Osiris/API/ItemToTransform|ItemToTransform]]
 
* [[Osiris/API/ItemToTransform|ItemToTransform]]
 
* [[Osiris/API/TeleportTo|TeleportTo]]
 
* [[Osiris/API/TeleportTo|TeleportTo]]

Revision as of 16:26, 1 July 2018

Full Definition(s)
  • call ItemMoveToPosition((ITEMGUID)_Item, (REAL)_X, (REAL)_Y, (REAL)_Z, (REAL)_Speed, (REAL)_Acceleration, (STRING)_Event, (INTEGER)_DoHits)
Description

Makes _Item move to the position (_X, _Y, _Z) in a straight line with initial speed _Speed m/s and with acceleration _Acceleration m/s2. If _DoHits is 1, the movement will stop if the item's movement is blocked by another item or character. If it is 0, the item will ignore other items and characters and just move through them. When the item stops moving, the event _Event should be raised for the item, but see the notes for details about this.

Notes
  • If the item is in a different level than the current one, this call behaves like a teleport inside that other level: the coordinates of the item are adjusted and the event is thrown immediately.
  • If the item is in the current level, the arrival event will not be thrown due to a bug. This will be fixed in a future version. Until then you can use a combination of databases and the ItemMoved event to detect when an item has finished moving.
  • Movements for items cannot be queued. Starting a new movement for an item that was moving, will replace the previous movement (and arrival event) with the new one.
See Also