Sasuke 1 Posted April 27, 2013 Hey guys, I've made an FOB for the 2nd Commando's (Using a Template from Armaholic) and I'm adding a classified area for Officers only (Which will just be something nice for the others to look forward to) and the only way to get in is through a laptop code. I've had a few ideas, but the one that I really wish I knew how to do was that a pop-up box (The Yellowy-Green thing lots of addons use) that you have to enter the code into, the you have the option to press "Enter Code". For the actual removal of it, I'm going to use something along the lines of this. Hmmm, i think the easiest way to do it would be to setup your outposts in editor where you want them then use "objectName hideObject true;" in effect turning them invisable. then you could use a trigger to turn them visable again with "objectName hideObject false;".. now, i say use a trigger because it has global effect and the hideobject command is local effect, so the trigger should make it so that everyone playing see's them again. (just tested) looks like your going to have to name all your pieces to hide because i couldnt get the "nearestobjects" command to work with all the pieces for some reason. so, just declare somewhere in mission or init your outpost name and objects - example outpost1 = [bunk1,bunk2,bunk3]; then use a trigger with condition true (so it removes them at mission start). then this in act: {_x hideObject true} forEach outpost1 then have another trigger that uses {_x hideObject false} forEach outpost1 whenever/however you want to get them back. another issue is a safe place for player who set off outpost to appear. if he's there in the middle, a building could spawn on him. that would be bad ;) also dont use this on ai units, they will still shoot and wont be seen. Any help would be greatly appreciated. Thanks! Lieutenant M. Sasuke 2nd Commando's Australian Regiment Share this post Link to post Share on other sites
Silderoy 1 Posted April 27, 2013 (edited) well for opening the gate, you can use that: _gateopen = [[block1,Block2], 123456789] execVM "opengate.sqf"; Block1 & block 2 are the Hbarriers you want to act as gate. 123456789 is the password that will open the gate. opengate.sqf: _gatearray = _this select 0; _truepass = _this select 1; [enter password script here] //make notice that you need to make a varable named "_usedpass", that will be the password that was entered to the laptop. if (_usedpass == _truepass) then { { _x hideobject true; } forEach _gatearray; sleep 10; { _x hideobject false; } forEach _gatearray; }; **not tested** cant help you with the entire password idea script, but when you got it, just put it in. ill give the dialog a try, but it would take time... always wanted to know how to do a ingame dialog, but it looks so complicated... Edited April 27, 2013 by Silderoy Share this post Link to post Share on other sites
dcthehole 1 Posted April 27, 2013 You could incorporate Wolfrug's codepad script from OFPEC.com. That is what the older life missions used. Share this post Link to post Share on other sites
Sasuke 1 Posted April 27, 2013 Having a look at that now... Not sure as to where the mirrors are located, though. Share this post Link to post Share on other sites
panther42 2 Posted April 27, 2013 (edited) CodePad by Wolfrug & Blanco Simple Bomb defusal with keypad, see how this one is done... There was another one for locking a laptop,or something similar. I'm still searching... Coltan Blues has a keypad in it also. You can look in the mission files to find out how it works. Edited April 27, 2013 by panther42 Share this post Link to post Share on other sites
Sasuke 1 Posted April 28, 2013 Looking at the second link, I've managed to change it up so that it now tends to my own scripts when activated/deactivated. private ["_bomb", "_id"]; _bomb = _this select 0; _id = _this select 2; [b]CODE = [(round(random 9)), (round(random 9)), (round(random 9)), (round(random 9)), (round(random 9)), (round(random 9))];[/b] _displayok = createdialog "KeypadDefuse"; private ["_code", "_inputcode", "_DEFUSED"]; _code = _this select 0; _inputcode = _this select 1; // compare arrays to see if code matches _DEFUSED = [_code, _inputcode] call BIS_fnc_areEqual; if (_DEFUSED) then { titletext ["Password Successful. Area Open.", "PLAIN DOWN"]; Cheget removeaction defuseaction; }; if (!_DEFUSED) then { titletext ["PASSWORD FAILED. ALARM TRIGGERED.", "PLAIN DOWN"]; sleep 5; Playsound "Alarm.ogg" }; CODEINPUT = []; However, I need it to only open to the password '365736'. I've been messing around with it for a while now but I can't seem to get it quite right... The BOLD part is what I believe I need to change. I've tried... CODE = [(365736)]; Any suggestions? Share this post Link to post Share on other sites
HorbeySpector 164 Posted April 28, 2013 sorry I can't help you with the scripting, but can you release a small template with this when you get it fully working so others can use it too? Thomas Share this post Link to post Share on other sites
Silderoy 1 Posted April 28, 2013 code = [3, 6, 5, 7, 3, 6]; Share this post Link to post Share on other sites
Sasuke 1 Posted April 29, 2013 code = [3, 6, 5, 7, 3, 6]; Of course... I forgot to keep seperating the numbers... Thank you so much for this! sorry I can't help you with the scripting, but can you release a small template with this when you get it fully working so others can use it too?Thomas When it's finished and working I'll upload a link for a downloadable version... Probably from my Dropbox. Share this post Link to post Share on other sites