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
Let's play "why doesn't my script work?"!
Romulator Offline
Not Tech Support ;-)

Posts: 3,628
Threads: 63
Joined: Jan 2013
Reputation: 195
#8
RE: Let's play "why doesn't my script work?"!

It always takes me so long to reply. You can read this if you want, but I'm sure you would have the general idea already

There are two ways I believe you could fix this from past experience... (I'm a nooby scripter Tongue)
1. Make the door explode Tongue The downside is it is noisy and if done incorrectly, can be a bit messy and a downside, but it clears the path. You would do this with
SetPropHealth("<portcullis>", 0.0f);
2. Use force:Well, the first thing you have to do is make sure the door unlocks after all the conditions are met. I don't know exactly where that code is in your code because I cannot read it specifically coz of my script knowlege, then maybe apply force that pushes the door open from either in front or behind.
SetSwingDoorLocked("<portcullis>", false, true);
SetSwingDoorDisableAutoClose("<portcullis>", true);  
SetSwingDoorClosed("<portcullis>", false, true);
AddPropForce("<portcullis>", x, y, z, "world");
The first line unlocks the door. The next one makes sure that when force is applied, the door doesn't just shut itself again. The next code opens the door ever so slightly, and then the AddPropForce simply pushes the door open Smile
Change:
"<Portcullis>" - Change to the name of your door as indicated in your Level Editor.
x, y, z, - Change to the needed co-ordinate. Your door should open either along the x or z axis :)

I may not be the best but that MAY help or give you an insight as to what to do Smile

Discord: Romulator#0001
[Image: 3f6f01a904.png]
(This post was last modified: 04-12-2013, 09:27 AM by Romulator.)
04-12-2013, 09:26 AM
Find


Messages In This Thread
RE: Let's play "why doesn't my script work?"! - by Romulator - 04-12-2013, 09:26 AM



Users browsing this thread: 2 Guest(s)