pawsUp1703
Junior Member
Posts: 45
Threads: 16
Joined: Jan 2011
Reputation:
0
|
Open a door with script
Hey I have a kinda dumb question I gues.. but I wanted to know if it is possible to open a door with a script.
You close it with the setswingdoorclosed command but if you set it to false the door doesn't open, thats what i tried first.
So does anybody know how to open a door with script?
I mean not to unlock it but to make it swing open...
It doesn't matter if you love him, or capital H.I.M.
Just put your Paws Up, 'cause you were Born This Way baby!
(This post was last modified: 01-09-2011, 03:25 PM by pawsUp1703.)
|
|
01-09-2011, 02:53 PM |
|
Tottel
Senior Member
Posts: 307
Threads: 9
Joined: Nov 2010
Reputation:
0
|
RE: Open a door with script
SetSwingDoorLocked("DoorName", false, true);
|
|
01-09-2011, 02:57 PM |
|
pawsUp1703
Junior Member
Posts: 45
Threads: 16
Joined: Jan 2011
Reputation:
0
|
RE: Open a door with script
(01-09-2011, 02:57 PM)Tottel Wrote: SetSwingDoorLocked("DoorName", false, true);
Uuhm I mean to make the door open not just unlock it i mean i want it to swing open..
It doesn't matter if you love him, or capital H.I.M.
Just put your Paws Up, 'cause you were Born This Way baby!
|
|
01-09-2011, 02:59 PM |
|
Tottel
Senior Member
Posts: 307
Threads: 9
Joined: Nov 2010
Reputation:
0
|
RE: Open a door with script
Oh, my bad.
I haven't actually used these before, but you can probably use one of these:
void AddPropForce(string& asName, float afX, float afY, float afZ, string& asCoordSystem);
void AddPropImpulse(string& asName, float afX, float afY, float afZ, string& asCoordSystem);
|
|
01-09-2011, 03:12 PM |
|
Frontcannon
Senior Member
Posts: 538
Threads: 10
Joined: Jul 2010
Reputation:
2
|
RE: Open a door with script
Just use SetSwingDoorClosed
╔═════════════════╗
☺ Smoke weed everyday ☺
╚═════════════════╝
|
|
01-09-2011, 03:15 PM |
|
pawsUp1703
Junior Member
Posts: 45
Threads: 16
Joined: Jan 2011
Reputation:
0
|
RE: Open a door with script
(01-09-2011, 03:12 PM)Tottel Wrote: Oh, my bad.
I haven't actually used these before, but you can probably use one of these:
void AddPropForce(string& asName, float afX, float afY, float afZ, string& asCoordSystem);
void AddPropImpulse(string& asName, float afX, float afY, float afZ, string& asCoordSystem);
I#ll try these also they look a little bit complex...
(01-09-2011, 03:15 PM)Frontcannon Wrote: Just use SetSwingDoorClosed
as I said i tried this but it didn't worked...
It doesn't matter if you love him, or capital H.I.M.
Just put your Paws Up, 'cause you were Born This Way baby!
|
|
01-09-2011, 03:22 PM |
|
Tottel
Senior Member
Posts: 307
Threads: 9
Joined: Nov 2010
Reputation:
0
|
RE: Open a door with script
They allow you to put a force along a 3D vector (hence the 3 axes).
|
|
01-09-2011, 03:24 PM |
|
pawsUp1703
Junior Member
Posts: 45
Threads: 16
Joined: Jan 2011
Reputation:
0
|
RE: Open a door with script
(01-09-2011, 03:24 PM)Tottel Wrote: They allow you to put a force along a 3D vector (hence the 3 axes).
The Script function site on wiki says that these commands shouldn't be used together with swingdoors as this would cause the game to crash.
It doesn't matter if you love him, or capital H.I.M.
Just put your Paws Up, 'cause you were Born This Way baby!
|
|
01-09-2011, 03:26 PM |
|
Tottel
Senior Member
Posts: 307
Threads: 9
Joined: Nov 2010
Reputation:
0
|
RE: Open a door with script
No, it says do not use them on the joints. ^^
But as I said, I haven't used them before.
|
|
01-09-2011, 03:31 PM |
|
Andross
Junior Member
Posts: 38
Threads: 1
Joined: Oct 2010
Reputation:
0
|
RE: Open a door with script
AddPropForce("MyDoor", 100.0f, 0.0f, 0.0f, "World");
That's how I implemented it successfully at various locations (as well as the developers ).
The example assumes that your door swings open towards the x-axis. If I remember it correctly, 100.0 is not enough to open the door completely, so you might have to either call this multiple times by means of a timer or adjust the force value.
|
|
01-09-2011, 03:36 PM |
|
|