Page 1 of 1

Adding Keypads for doors to any Mission Script

Posted: Sun Aug 31, 2014 3:49 am
by CorinthMaxwell
To elaborate, there are certain doors in certain areas that I would like to place keypads (or simple buttons) near, so that they will open when a code is entered (or when a button is pressed). There seem to be quite a few doors in the game that JC can apparently walk up to and open whenever he's in their corresponding rooms, but he can never enter them from the outside by normal means.

Re: Adding Keypads for doors to any Mission Script

Posted: Sun Aug 31, 2014 11:11 am
by bjorn98009_91
Not quite sure what you mean, do you want to spawn a keypad from MissionScript? Then take a look at Mission06.uc, the dummy keypad outside of Tong's compound is destroyed when you have completed certain objectives and a new one is spawned in its place with the proper code.

Re: Adding Keypads for doors to any Mission Script

Posted: Sun Aug 31, 2014 12:47 pm
by Hanfling
In Mission06.uc Keypads are just destroyed and unhidden, not actually spawned.

But i don't see the problem, just remove the tigger which opens the door. Use foreach and check the name of the trigger (or event? or whatever is used to upen the door). And call spawn to spawn a Button/Keypad nearby and set the event and code.

Re: Adding Keypads for doors to any Mission Script

Posted: Sun Aug 31, 2014 6:12 pm
by CorinthMaxwell
bjorn98009_91 wrote:Not quite sure what you mean, do you want to spawn a keypad from MissionScript? Then take a look at Mission06.uc, the dummy keypad outside of Tong's compound is destroyed when you have completed certain objectives and a new one is spawned in its place with the proper code.
An example is UNATCO's prison cells. It's known by quite a few people that JC can personally interrogate the NSF Troopers at the beginning of Mission 03 (before Walton Simons gets ahold of them), but unless the player is using the cheat code "ghost", he can't actually get into the cell. The thing is, he can still exit the cell as if he had access to them all along. I'd just like to be able to make it possible for him to open doors like that via normal means.

Re: Adding Keypads for doors to any Mission Script

Posted: Mon Sep 01, 2014 10:39 am
by DDL
opensesame? :)

Also, it is faintly ludicrous that UNATCO has door-opening switches on the inside of their interrogation cells.

"Well, we wouldn't want anyone to get stuck in our prison. That would be crazy."

Re: Adding Keypads for doors to any Mission Script

Posted: Mon Sep 01, 2014 4:17 pm
by Hanfling
The doors use an advanced IFF system!

Open for friendlies, chunk up for enemies!

Re: Adding Keypads for doors to any Mission Script

Posted: Tue Sep 02, 2014 10:15 pm
by CorinthMaxwell
DDL wrote:opensesame? :)
Uhh......no. Cheats aren't enabled, nor will they be. :?

Re: Adding Keypads for doors to any Mission Script

Posted: Thu Sep 04, 2014 10:27 am
by DDL
Just saying. It's a fuckton easier to just use that on doors than it is to export, recode, and then recompile large chunks of missionscripts with calls to spawn buttons at specific vector coordinates with hardcoded event names.

Re: Adding Keypads for doors to any Mission Script

Posted: Thu Sep 04, 2014 2:51 pm
by Hanfling
You could also use a Mutator for that. ^^