Category: Objects / Status
Since engine version: 8.0 OC
Returns whether the object is stuck, meaning that one of its vertices is enclosed in solid matter. An optional offset can be specified, in which case it is checked whether the object would be stuck at the offset position.
bool Stuck(int x, int y);
- [opt] X offset for which stuck-status is checked.
- [opt] Y offset for which stuck-status is checked.
Displays a message above the selected clonk of the first player if the clonk is stuck at the time the script is called.
if(GetCursor()->Stuck() && !GetCursor()->Stuck(0, -10)) GetCursor()->SetPosition(GetCursor()->GetX(), GetCursor()->GetY() - 10);
If the clonk is stuck at its current position but would not be stuck 10 pixels higher, move it upwards.