Facebook Twitter YouTube Frictional Games | Forum | Privacy Policy | Dev Blog | Dev Wiki | Support | Gametee


Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Script Help How do I make a chair move?
CarnivorousJelly Offline
Posting Freak

Posts: 1,196
Threads: 41
Joined: Dec 2012
Reputation: 80
#2
RE: How do I make a chair move?

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...
PHP Code: (Select All)
void AddPropForce(stringasNamefloat afXfloat afYfloat afZstringasCoordSystem);
// for pushing the chair, asName is the name of the chair being pushed
void AddEntityCollideCallback(stringasParentNamestringasChildNamestringasFunctionbool abDeleteOnCollideint 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!

[Image: quote_by_rueppells_fox-d9ciupp.png]
12-10-2016, 09:04 AM
Find


Messages In This Thread
How do I make a chair move? - by goodcap - 12-10-2016, 06:57 AM
RE: How do I make a chair move? - by CarnivorousJelly - 12-10-2016, 09:04 AM
RE: How do I make a chair move? - by Spelos - 12-10-2016, 10:24 AM
RE: How do I make a chair move? - by Spelos - 12-11-2016, 09:00 AM
RE: How do I make a chair move? - by Mudbill - 12-10-2016, 04:03 PM
RE: How do I make a chair move? - by goodcap - 12-10-2016, 05:16 PM
RE: How do I make a chair move? - by goodcap - 12-10-2016, 07:31 PM
RE: How do I make a chair move? - by Mudbill - 12-10-2016, 07:48 PM
RE: How do I make a chair move? - by goodcap - 12-10-2016, 08:08 PM
RE: How do I make a chair move? - by goodcap - 12-10-2016, 09:17 PM
RE: How do I make a chair move? - by Spelos - 12-12-2016, 08:19 PM
RE: How do I make a chair move? - by Spelos - 12-16-2016, 09:36 AM
RE: How do I make a chair move? - by Daemian - 12-16-2016, 06:01 PM



Users browsing this thread: 2 Guest(s)