From Divinity Engine Wiki
Jump to: navigation, search
Full Definition(s)
  • call ItemMoveToPosition((ITEMGUID)_Item, (REAL)_X, (REAL)_Y, (REAL)_Z, (REAL)_Speed, (REAL)_Acceleration, (STRING)_Event, (INTEGER)_DoHits)

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.

  • 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 already moving will replace the previous movement (and arrival event) with the new one.
  • Triggers left/entered during the move will result in ItemEnteredTrigger and ItemLeftTrigger events as appropriate.
See Also