void_false 1 Posted May 14, 2004 First of all, good time of a day, pll! While making another mission i got stuck with one little thing: is it possible to lock somehow doors on resistance building? I just dont want to let player access some house, before he achieves some objectives. I thought about placing closed house on the map . The house that has windows and doors only as textures. And after player achieves needed objectives i delete this house and place instead of it new one with windows and working doors. But, hell, this looks weird Thanks in advance for any help Share this post Link to post Share on other sites
NeMeSiS 11 Posted May 14, 2004 well, if u can detect if that door is open, u can close it with object ID [animate blablabla, but i dunno if u can detect it Share this post Link to post Share on other sites
Ironsight 1 Posted May 14, 2004 UNPBO the BAS demo mission Ranger Raiders, this mission features a locked door Share this post Link to post Share on other sites
void_false 1 Posted May 14, 2004 Well, thx for help. But, Ironsight, i dont want to use addon Share this post Link to post Share on other sites
Matthijs 40 Posted May 14, 2004 Well, thx for help.But, Ironsight, i dont want to use addon  So read what he's writing: Quote[/b] ]UNPBO the BAS demo mission Ranger Raiders, this mission features a locked door By de-PBOing the mission, you can see how they pulled the trick. Share this post Link to post Share on other sites
Ironsight 1 Posted May 14, 2004 Well, thx for help.But, Ironsight, i dont want to use addon  So read what he's writing: Quote[/b] ]UNPBO the BAS demo mission Ranger Raiders, this mission features a locked door  By de-PBOing the mission, you can see how they pulled the trick. Seems pretty handy to me, UNPBOing a mission learns me a lot about making such additions to missions Share this post Link to post Share on other sites
void_false 1 Posted May 14, 2004 Ok, i looked on BAS site and didnt find Ranger Raiders mission. BAS always uses strange addons such as their gamelogicls, so i thing they made a trick espessialy with some kind of addon. Nevermind. just plz tell me where can i find that mission. Share this post Link to post Share on other sites
Ironsight 1 Posted May 14, 2004 Ok, i looked on BAS site and didnt find Ranger Raiders mission. It's in the demo mission pack for the Delta/Ranger pack, it's on the download page  EDIT: A little mistake, look on the mission page since the addons page is offline Share this post Link to post Share on other sites
void_false 1 Posted May 14, 2004 Heh, i have the addon but deleted missions. Downloading again  EDIT: Can you point me the link? Share this post Link to post Share on other sites
Blanco 0 Posted May 14, 2004 try object 15832 animate ["dvere",0] to close the door object 15832 animate ["dvere",1] to open it It's "dver","dvere","dvere1" or "dvere01" I'm cant check it here... 15832 is just an ID I choose, I dunno it's a house... Share this post Link to post Share on other sites
void_false 1 Posted May 14, 2004 then i come in front of door and press middle mouse's button on action "Open Door" Share this post Link to post Share on other sites
Blanco 0 Posted May 14, 2004 well, if u can detect if that door is open, u can close it with object ID [animate blablabla, but i dunno if u can detect it  Should be something like this : ?object 15452 animationphase "dvere" > 0.01 : hint "door's open" or ?object 15452 animationphase "dvere" < 0.9 : hint "door's closing" Share this post Link to post Share on other sites
void_false 1 Posted May 14, 2004 Well guys, looks like you completely dont understand me. I need to _lock_ the door. i dont need to close or open it. i just need it to be something like you have no that action to open door. Share this post Link to post Share on other sites
Blanco 0 Posted May 14, 2004 You can't remove the action, but you lock it lol, ok try this then : [15421] exec "lockdoor.sqs" <table border="0" align="center" width="95%" cellpadding="0" cellspacing="0"><tr><td>Code Sample </td></tr><tr><td id="CODE"> lockdoor.sqs _ID = _this select 0 _unlockit = false object _ID animate ["dvere",0] #loop ?_unlockit : exit ?object _ID animationphase "dvere" > 0.01 : object _ID animate ["dvere",0] ~0.01 goto "loop" Share this post Link to post Share on other sites
Ironsight 1 Posted May 15, 2004 I don't know if you solved your problem yet but here is the exact link Good luck with it Share this post Link to post Share on other sites
void_false 1 Posted May 15, 2004 Thank you very much for help. thanks for script. I made small modifications to make it work propertly. Because it didnt let to *close* the door  here's new one: <table border="0" align="center" width="95%" cellpadding="0" cellspacing="0"><tr><td>Code Sample </td></tr><tr><td id="CODE"> _ID = _this select 0 _unlockit = false object _ID animate ["dvere1",1] #loop ?_unlockit : exit ?object _ID animationphase "dvere1" < 1 : object _ID animate ["dvere1",1] ~0.01 goto "loop" Door slightly moves when you try to open it, but it is even better. I will add sound on event so it will look more realistic EDIT: Tested on Victor Troska's house Share this post Link to post Share on other sites
redface 1 Posted May 17, 2004 very useful script, thx! it would be interesting to know whether the script posted here matches the way BAS does it in that mission ... Share this post Link to post Share on other sites
void_false 1 Posted May 17, 2004 Yeah! thx everybody for help  BTW that mission doesnt run for me. some addons missing. What i wanted to ask is that which addons does it need? i have bavehawks and blackhawks + de/ra. Maybe it needs littlebirds? Or what? Share this post Link to post Share on other sites
Ironsight 1 Posted May 17, 2004 It needs Littlebirds and the Delta/Ranger pack, I tought Share this post Link to post Share on other sites
Blanco 0 Posted May 17, 2004 <table border="0" align="center" width="95%" cellpadding="0" cellspacing="0"><tr><td>Code Sample </td></tr><tr><td id="CODE">_ID = _this select 0 unlockit = false object _ID animate ["dvere1",1] #loop ?unlockit : exit ?object _ID animationphase "dvere1" < 1 : object _ID animate ["dvere1",1] ~0.01 goto "loop" _unlockit is a bolean, but you can only set him to true in the lockscript itself because it's a local variable. (_unlockit) I'd suggest you change that in a global variable, this allows you to unlock the door with a unlockit = true in a trigger,waypoint or another script. Â Share this post Link to post Share on other sites