Home   Help Search Login Register  

Advertisement

Author Topic: Codepad 1.0  (Read 9903 times)

0 Members and 1 Guest are viewing this topic.

Offline Blanco

  • Former Staff
  • ****
Codepad 1.0
« on: 30 Aug 2004, 20:14:25 »
Codepad1.0Beta by Blanco

Wohoo, here is my first dialog.




Codepad1.0 demomission (editorupgrade required) *Link removed* See lower for 1.1

Used programs.

- Dialogmaker (great tool!)
- Soundforge 5.0
- Photoshop 7.0 & illustrator 10
- Textview
- Chris OFP script editor

Features

- Dialog with a numeric pad. - paper with code
- Display and 2 leds (red & green).
- Custom sounds

For the demo mission (not really a part of the codepad script)

- Scripted gates with custom sounds


Parameters :

- 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


Code: [Select]
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"

example :

[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"  

Example :

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.







« Last Edit: 20 Jan 2005, 01:05:38 by Blanco »
Search or search or search before you ask.

Offline General Barron

  • Former Staff
  • ****
  • Semper Fi!
Re:Codepad 1.0
« Reply #1 on: 31 Aug 2004, 00:24:03 »
Wow, sounds great! I'll try this out soon. One thing though:

Quote
- 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!
Why not? You should be able to save the text that is in the display over the numbers, and then compare that string to the correct codestring.

Anyway, gotta try it out now!
HANDSIGNALS COMMAND SYSTEM-- A realistic squad-control modification for OFP
kexp.org-- The best radio station in the world, right here at home! Listen to John Richards!

Offline Blanco

  • Former Staff
  • ****
Re:Codepad 1.0
« Reply #2 on: 31 Aug 2004, 17:29:41 »
Quote
Why not? You should be able to save the text that is in the display over the numbers, and then compare that string to the correct codestring.

Because every button in the dialog updates a variable KeYpad_num
Check the description.ext ,lets take the button ,digit 7

Code: [Select]
"Keypad_num = Keypad_num +1;num=format [{%1%2},(ctrlText 999),7];ctrlSetText [999,num];playsound ""button"""

Everytime you press that button Keypad_num will be updated.

Code: [Select]
Keypad_num = Keypad_num +1

Show the number 7 in the display (id 999) when you press button 7

Code: [Select]
num=format [{%1%2},(ctrlText 999),7];ctrlSetText [999,num]

...then in the numpadcrack script I check the how many times you press a button and compare the code you enter with the actual code.

Code: [Select]
_ok = createDialog "Dialog1"


;; Hide the paper with code, id 599 is the picture with the paper
ctrlShow [599, false];
;; Hide the green led, id 598 is the picture of the green led
ctrlshow [598, false]
;; Hide the red led,id 597 is the picture of the red led
ctrlshow [597, false]

;; Numarray contains the name of the button and the code (check numpad.sqs)
_password = Numarray select 1

;; When codefound = true, show the paper and code (id 600 is the text with code)
?(codefound) : ctrlShow [599, true]; ctrlSetText [600, format["%1",_password]]


;;;blablabla
ctrlSetText [999,"Welcome..."]
~1
ctrlSetText [999,"Enter your code"]
~1
ctrlSetText [999,""]

#start
;; Hide the two leds again in case you enter the code more then once
ctrlshow [598, false]
ctrlshow [597, false]

;; Reset Keypad_num value
Keypad_Num = 0

Wait until Keypad_num is equal to the MAXNR (check numpad_init.sqs)
@(Keypad_Num == MAXNR)
Keypad_Num = 0

; compare the code you entered with the real code, if code is right jump to the "open" label which opens the gate...
? ctrlText 999 == _password : goto "open"
;; if code is wrong, some blablabla :-)
ctrlSetText [999,"ACCESS DENIED"]
;; euuuuuuuuuuuuu!
playsound "wrongcode"

;; Show the red led
ctrlshow [597, TRUE]
~2
Clear the display
ctrlSetText [999,""]
goto "start"

#open
;; Show the green led
ctrlshow [598, TRUE]
;; pidipidibip!
playsound "codefound"
;; more blablabla...
ctrlSetText [999,"ACCESS GRANTED"]
~0.5
Remove the action "enter your code"
(_this select 0) removeaction (_this select 2)
~2
; close the dialog
closeDialog 0

So, thats the reason... I need to find a way to update the Keypad_num by counting the total number of digits in the display.
It's probably possible, but I'm still in my babysteps of dialogmaking, anyways...I'm pretty proud with my first dialog  :P

The position of the colored leds was pretty boring to do, but it was worth the effort (position is still not perfect, just a few millimeters to high)







« Last Edit: 31 Aug 2004, 17:33:10 by Blanco »
Search or search or search before you ask.

Offline LCD

  • Former Staff
  • ****
    • Everon Cartel
Re:Codepad 1.0
« Reply #3 on: 31 Aug 2004, 17:31:56 »
actually da everon cartel already done somin like dat ;) ;D i scripted it ;D  :P

jsut download da EC safe from www.everoncartel.com

even tho ur dialog do look beter ;D :thumbsup:

LCD OUT

[edit] ohh u said dat.... wasnt dere some disclamair u shud request b4 usin shit we did ? ::) :P.... um nywayz right now u have temporary taam till i think bout dat :P
« Last Edit: 31 Aug 2004, 17:33:02 by LCD »
"guess being the community has downsides .." - cheetah
Help Perfecting Da Next Best Thing - O-Team Beta

Offline Blanco

  • Former Staff
  • ****
Re:Codepad 1.0
« Reply #4 on: 31 Aug 2004, 17:57:45 »
 :-\ Yeah, I've used some code of the ECLSafe and didn't asked your permission...(I didn't read disclamer, my fault)

I apoligise for that, I only wanted to make a codepad in a dialog without having any addons.

But I understand... if you don't take my apoligies, i'll delete this post and link.

 



Search or search or search before you ask.

Offline LCD

  • Former Staff
  • ****
    • Everon Cartel
Re:Codepad 1.0
« Reply #5 on: 31 Aug 2004, 18:02:46 »
nah

continue..... im 1 of em sharware ppl ;) ;D nd i want u 2 do dat... jsut dont forget 2 ask for premision next taam :P n put our name in bigger letters ;D ;)

mebe well request noder ting (gotta talk w/ ma team members) but no way well b tellin u 2 delete ur work or not release it, dont wry ;D

in wayz keep it up nd do oder great scripts :thumbsup:

LCD OUT
"guess being the community has downsides .." - cheetah
Help Perfecting Da Next Best Thing - O-Team Beta

Offline MMFF

  • Members
  • *
  • Mission Maker From Finland
Re:Codepad 1.0
« Reply #6 on: 11 Jan 2005, 12:54:34 »
I canÂ't get it it says that the site is forbidden :'(
Do I need to play Operation Flashpoint to be here?

EX-PARA

  • Guest
Re:Codepad 1.0
« Reply #7 on: 12 Jan 2005, 00:06:34 »
Check your PM

BronzeEagle

  • Guest
Re:Codepad 1.0
« Reply #8 on: 12 Jan 2005, 10:57:48 »
What if I want the codekeeper to be one particular man and not a random man?

Offline Triggerhappy

  • Contributing Member
  • **
  • Llama, it's what's for dinner.
Re:Codepad 1.0
« Reply #9 on: 12 Jan 2005, 22:03:37 »
i can't get to the script but it looks like you could just give it the name of the unit as the argument instead of the group, but as an array:

Code: [Select]
[[unit1]] exec "pad/randomassign.sqs"

all a group is is an array of each unit in that group

BronzeEagle

  • Guest
Re:Codepad 1.0
« Reply #10 on: 13 Jan 2005, 14:11:08 »
Yeah cuz that'd be awesome if your target was just one man, hard to get access to cuz he has lots of bodyguards and he's well protected and stuff.  Then you'd have to like, get the password off him.  Like Bill Gates.

Offline Triggerhappy

  • Contributing Member
  • **
  • Llama, it's what's for dinner.
Re:Codepad 1.0
« Reply #11 on: 14 Jan 2005, 00:24:06 »
hey blanco, could you either post the part of your script having to do with the selection of the random unit or fill us in so we can clear this up for BronzeEagle

BronzeEagle

  • Guest
Re:Codepad 1.0
« Reply #12 on: 14 Jan 2005, 02:02:44 »
That'd be bad if the single man who knows the code is kidnapped, but you have to find him to save the world.  Can you make a scud demo mission using the keypad to where if you don't get the code entered in time the scud will launch for us?

Offline Blanco

  • Former Staff
  • ****
Re:Codepad 1.0
« Reply #13 on: 14 Jan 2005, 02:46:45 »
Well, guys

I had a huge HD crash and I've lost a lot of stuff (this script for example) caused by orphan files...  and I left the OFP community...

forever?
until OFP2 arrives?
for a while?  

I really don't know... time will tell.

But I still check fansites and forums once a while.

Quote
What if I want the codekeeper to be one particular man and not a random man?

AFAIK, don't run the randomassign script, name your guy codekeeper and place the trigger for the "search his body" action





« Last Edit: 14 Jan 2005, 03:05:35 by Blanco »
Search or search or search before you ask.

Offline Triggerhappy

  • Contributing Member
  • **
  • Llama, it's what's for dinner.
Re:Codepad 1.0
« Reply #14 on: 14 Jan 2005, 04:37:20 »
Quote
...  and I left the OFP community...

MEDIC!! I think we've lost him! NOOOOOOOOO!!!


that sucks about your comp crash, hope you make it back in one piece

BronzeEagle

  • Guest
Re:Codepad 1.0
« Reply #15 on: 16 Jan 2005, 04:59:51 »
indeed it does.  man, i gotta figure out how to use this.  anything that makes for an important character in a story makes for a good mission.  

Offline Triggerhappy

  • Contributing Member
  • **
  • Llama, it's what's for dinner.
Re:Codepad 1.0
« Reply #16 on: 16 Jan 2005, 18:03:42 »
I'd like to take a look at it (and maybe try and modify it if its ok with blanco), but the dl link doesn't work
can anyone get it hosted somewhere even if it only satys up for a week before the host takes it down?(some sites do that)

DBR_ONIX

  • Guest
Re:Codepad 1.0
« Reply #17 on: 16 Jan 2005, 20:20:05 »
I'd be more than happy to host it on my server (It's extremely stable.. I've been using it for, hmm, 3 years? And it's been done for about 1 day..)
But I lost the script ages ago (Was on old computer, that got a new harddrive, when I got the new PC)
But if someone can send it to ben @ dbrweb. co.uk (With spaces removed, incase you didn't realise...), I'll upload it as soon as I get it! :)
- Ben

Offline Blanco

  • Former Staff
  • ****
Re:Codepad 1.0
« Reply #18 on: 17 Jan 2005, 15:09:00 »
I've found something named codepad1.1 on my HD at work, lol
It looks like it's an update (1.1) and the codekeeper is not random ...I can't remember I did one

http://users.telenet.be/blanco/Scripts/codepad1.1.Intro.zip

I hope it works, cos I can't test it  :)
« Last Edit: 17 Jan 2005, 15:21:33 by Blanco »
Search or search or search before you ask.

Offline Morglor9

  • Members
  • *
Re:Codepad 1.0
« Reply #19 on: 24 Mar 2005, 16:50:56 »
It should be possible to put the code on an object, instead of a man, shouldn't it? Ex. break into the base, search the officers desk, find the code and do whatever else.
Cymbaline

Offline Blanco

  • Former Staff
  • ****
Re:Codepad 1.0
« Reply #20 on: 24 Mar 2005, 17:45:34 »
Offcourse :

To use your example, try this :

Place your object.
In the init :
Code: [Select]
this addaction ["Search the desk","Desk.sqs"]
Then make the script :

Code: [Select]
;Desk.sqs

(_this select 0) removeaction (_this select 2)
hint "You have found the code!"
~1
codefound = true
exit

The bolean codefound is used so the paper with the code will be visible when you enter it at the codepad.

Not tested, but I'm pretty sure it works.
PS: You don"t need to run the randomassign script anymore.

« Last Edit: 24 Mar 2005, 17:46:17 by Blanco »
Search or search or search before you ask.

Offline RujiK

  • Members
  • *
  • KoKo Puh-Fizzles!
Re:Codepad 1.0
« Reply #21 on: 30 Mar 2005, 21:26:04 »
Looks awesome, however The link wont work for me.
It says forbidden I dont have permission to access server.
I like your approach, lets see your departure.
Download the New Flashlight Script!

Offline Blanco

  • Former Staff
  • ****
Search or search or search before you ask.

Offline Morglor9

  • Members
  • *
Re:Codepad 1.0
« Reply #23 on: 09 Apr 2005, 18:47:22 »
Blanco, this is a great script. Mind if I use this in my OFP:Deus Ex campaign? (that isn't the title, i just haven't named it yet).
Cymbaline

Offline Blanco

  • Former Staff
  • ****
Re:Codepad 1.0
« Reply #24 on: 09 Apr 2005, 19:03:39 »
Not at all, go ahead :)
 
Search or search or search before you ask.

Offline Morglor9

  • Members
  • *
Re:Codepad 1.0
« Reply #25 on: 09 Apr 2005, 22:08:41 »
Excellent. its rather necessary (as anyone whose played DX knows) to have keypads and codes. thank you. the script is wonderful.
Cymbaline

Offline Morglor9

  • Members
  • *
Re:Codepad 1.0
« Reply #26 on: 16 Apr 2005, 23:30:55 »
LCD, the link to the Everon Cartel site is down. is their anywhere else that i can find the safe?
Cymbaline

Offline Blanco

  • Former Staff
  • ****
Re:Codepad 1.0
« Reply #27 on: 26 Apr 2005, 10:55:12 »
I think LCD has left the community...
Search or search or search before you ask.

Offline Morglor9

  • Members
  • *
Re:Codepad 1.0
« Reply #28 on: 30 Apr 2005, 05:51:25 »
unfortunate. i would like to try that safe.
Cymbaline

Offline Blanco

  • Former Staff
  • ****
Re:Codepad 1.0
« Reply #29 on: 30 Apr 2005, 12:22:42 »
I dunno where you find it. Have you tried Gamezone.cz?

Lots of these pioneers have left the community, some of them return.
Like Vektorboson, I saw him on the BI forum a few days ago :)
Search or search or search before you ask.

Swatdog

  • Guest
Re:Codepad 1.0
« Reply #30 on: 02 Sep 2005, 04:53:24 »
I know this has been out for a while, but I would like to commend you on your excellent work.

Offline OFPfreak

  • Members
  • *
  • Who is da operation flashpoint freak now, freak?!
    • OFP NFS mod
Re:Codepad 1.0
« Reply #31 on: 07 Sep 2005, 06:50:52 »
wow the most amazing thing of this script is the litle base in the demo mission  ;D!
ofp nfs REBORN! All new nitro, neon, customized cars, off-road, on-road, rally, bikes, racer models and more!
ofp nfs's homepage

Offline Gruntage

  • Moderator
  • *****
  • How do I get outta this chickensh*t outfit?
Re: Codepad 1.0
« Reply #32 on: 12 Dec 2011, 21:39:28 »
Does anyone know if this is still available to download somewhere? It looks like a really good feature and I'd like to incorporate something similar into one of my missions

Btw sorry for making a post on such an old topic, I wasn't sure whether to make a new topic or not
Some of the most memorable missions made involve the player doing very little...

"But one thing I can tell you from not just OFP but life in general:  criticism is directly proportional to quality. The more criticism a mission receives, the better the outcome" - macguba

Walter_E_Kurtz

  • Guest
Re: Codepad 1.1
« Reply #33 on: 13 Dec 2011, 01:07:06 »
Firstly, it should be noted that Blanco recovered version 1.1 from his hard-disk.

There's a copy in the Editors' Depot with a readme added by RichUK (though that's just a cut-and-paste job on the first post in this thread, and makes promises about a version 1.2 about which I can find nothing).

Offline Gruntage

  • Moderator
  • *****
  • How do I get outta this chickensh*t outfit?
Re: Codepad 1.0
« Reply #34 on: 13 Dec 2011, 09:10:37 »
Thanks W.E.K  :D Guess I should have looked in the obvious place before making a post lol  :)
Some of the most memorable missions made involve the player doing very little...

"But one thing I can tell you from not just OFP but life in general:  criticism is directly proportional to quality. The more criticism a mission receives, the better the outcome" - macguba