I can think of two simple-ish ways of doing this
Method 1: Chair is an Enemy (arguably easiest)
- turn the chair into an entity and then into an enemy (specifically the water monster type)
- edit the files so there aren't any sound effects (perhaps wood scraping when it moves, but that's it)
- edit the .ent file so its movement speed is slow and it does not damage with attacks
- in script: replace a regular chair with the enemy chair-entity when the player hits the trigger point
Method 2: Rough Estimate
If the chair is at one end of the hallway and the player is at the other, all you need to use is
-
void AddPropForce(string& asName, float afX, float afY, float afZ, string& asCoordSystem);
Method 3: Rougher Estimate
Have a series of collision areas for the player and push the prop towards those when the player collides with them, this is a combination of...
void AddPropForce(string& asName, float afX, float afY, float afZ, string& asCoordSystem);
// for pushing the chair, asName is the name of the chair being pushed
void AddEntityCollideCallback(string& asParentName, string& asChildName, string& asFunction, bool abDeleteOnCollide, int alStates);
// for detecting where the player is and where the chair is
// so you can calculate the vectors needed to push the chair towards the player
If you need elaboration on the enemy one, let me know!