Codepad1.0Beta by Blanco
Wohoo, here is my first dialog.Codepad1.0 demomission (editorupgrade required)
*Link removed* See lower for 1.1
- Dialogmaker (great tool!)
- Soundforge 5.0
- Photoshop 7.0 & illustrator 10
- Chris OFP script editorFeatures
- Dialog with a numeric pad. - paper with code
- Display and 2 leds (red & green).
- Custom soundsFor the demo mission (not really a part of the codepad script)
- Scripted gates with custom soundsParameters :
- name of the object that represents the codepad (could be a laptop, a vehicle... whatever)
- The code between quotes. Use "-1" when you want a random code at the start of your mission.Example :
You already know the code from the beginning via the briefing or whatever :
[laptop,"123456"] exec "pad\numpad.sqs"
You have to find the code, a random code is generated from the beginning.[button,"-1"] exec "pad\numpad.sqs"Codekeeper
You can give the code to the enemy with the randomassign script.
When this script is running on an enemygroup, somebody randomly carries the code with him.
When you kill him and search his body the code will be yours.
You will see the code on a little piece of paper when you have to enter the code.
The guy with the code is named codekeeper
in the script, so you don't have to name him manually.
You need one trigger for the "search his body" action
ACTIVATION : none, repeatedly
CONDITION : !codefound && alive player && !alive codekeeper && player distance codekeeper < 1.5
ONACTIVATION : Codeaction = codekeeper addaction ["Search his body","pad\code.sqs"]
ONDEACTIVATION : codekeeper removeaction Codeaction
Run the script on an enemygroup like this[name of the group] exec "pad\randomassign.sqs"
[enemygrp1] exec "pad\randomassign.sqs"Codefound = true
When somebody told you the code during the mission via an informant or whatever, use the bolean Codefound = true
in a trigger or script.
The code (the paper) will be shown aswell when you try to enter the code.MAXnr
A code can only have numbers (0 to 9) and two special characters * and #
A code has 6 digits default, but you can make the code longer if you want.
Just open the codepad.init.sqs in the pad directory and change the MAXNR
variable into an other value. 12 digits is the maximum!Applications :
The codepad can be used in lots of scenario's (stealth missions I guess), just use your imagination...
A code to open a door.
A code for you car
A code to launch a scud
Disarm a bomb...
So this script is a bit a do-it-yourself script.Doors
In the demomission you need a code to open the gates of a garagebox and steal an ammotruck. (very easy)
The doors are nothing more than 2 fences that slide in a certain direction via scripting (setpossing)
(*) I've used code from another script that's not mine
No author was mentioned in the script, thanks to the guy/girl
The parameters for that script are :[Name of the object that represent the codepad, name of the leftdoor, name of the rightdoor,direction the leftdoor should slide, direction the rightdoor should slide, slidedistance in Meters] exec "doors\open.sqs"
Your doors are facing north : (azimuth 0)[button,GateL,GateR,275,85,2.3] exec "doors\open.sqs"
The left door should slide to the WEST, so azimuth is 275
The right door should slide to the EAST, azimuth is 85
The slide over 2.3 meter, that depends on the fence you are using in the editor
Use the "doors\open.sqs"
to open the gates, and..."doors\close.sqs"
to close them again.
btw : This script is activated at the end of the codepadcrack script in the pad directory.
Should work in MP, but not recommended,, because this script uses a very fast loop when the gates open and close.Bugs :
- You can use your numeric keypad on your keyboard to enter the code, but the script won't react then, you have to use the dialog buttons!
- There can only be one codepad and code per mission.
- When the codekeeper enters a vehicle and you shot him, the "search his body" action won't show up for some reason.
- Not tested in MP
Last minutes notes :
- Some code from the ECLsafe addon was used.
- The zip includes a Dutch readme, check this post for the euh... English instructions. I will update the file later with an English readme.
- In the demomission the randomassign script is running on every member in the enemygroup, One unit in the group is enough tho..
I made a mistake there... I can't update the file now, I have to contact my host first.
That's all folks.