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
AddBodyForce Cabinet Doors Script Problem
Mazl Offline
Junior Member

Posts: 5
Threads: 1
Joined: Jun 2013
Reputation: 0
#12
RE: AddBodyForce Cabinet Doors Script Problem

(06-15-2013, 03:41 AM)Amn Wrote:
(06-13-2013, 02:30 PM)DeAngelo Wrote: This would be a bit roundabout, but you could try this: Make a new entity that is a move object, but is invisible. (You could just modify the blockbox and save it as a new entity)

Then place them in the level at the right angles so that when you move them (and move them rather fast but a short distance) they will "smack" the doors.

As I said, a bit roundabout but it should achieve what you want.
Actually that's an awesome idea.
I don't know if applying it here it's the best solution but it's great for more complex stuff. So i'll keep it in mind in case i ever need it. +rep DeAngelo.

Mazl,

I always use BodyImpulse and is working for me.
I just put the cabinet in my map, wrote this line and it opened one door as it should.


AddBodyImpulse( "cabinet_nice_1_Body_1", 5, 0, 5, "" );





Now when I Use this code:

AddBodyImpulse( "cabinet_nice_2_Body_1", 0, 0, -3, "" );
AddBodyImpulse( "cabinet_nice_2_Body_2", 0, 0, -3, "" );

than it is working.... this is strange for me, but now its working, thanks Smile

Edit: oh no, now i know why it dont worked. It was because i locked the door at the beginning, and unlocked it in the middle. But when i not lock it at the beginning, than it is working.... (i know, very bad english Big Grin)
(This post was last modified: 06-16-2013, 10:46 PM by Mazl.)
06-16-2013, 05:21 PM
Find


Messages In This Thread
RE: AddBodyForce Cabinet Doors Script Problem - by Mazl - 06-16-2013, 05:21 PM



Users browsing this thread: 1 Guest(s)