float playerX;
float playerY;
float chairX;
float chairY;
void NudgeChairTowardsPlayer()
{
chairX = GetEntityPosX("theChairEntity");
chairY = GetEntityPosY("theChairEntity");
playerX = GetPlayerPosX();
playerY = GetPlayerPosY();
float playerXinRelationToChair = playerX - chairX;
float playerYinRelationToChair = playerY - chairY;
// These will be basically the distance between the chair and the player.
// Now you can for example multiply the distance to get a strong enough
// push. According to script wiki the values are ~100 (weak) to ~10000
// (strong)
float forceMultiplier = 500; // Play around with this value.
AddPropForce("theChairEntity", playerXinRelationToChair * forceMultiplier, playerYinRelationToChair * forceMultiplier, 0.0f, "world");
}