Home   Help Search Login Register  

Author Topic: Timebomb 3.3  (Read 7016 times)

0 Members and 1 Guest are viewing this topic.

Offline Blanco

  • Former Staff
  • ****
Timebomb 3.3
« on: 25 Mar 2005, 11:35:46 »
This is an old script I've wrote back in 2004, but it was never submitted here.

The script simulates a timebomb that can be defused by cuting one of the three colored wires.
The lethal weapon (dunno which one it was)...way :-)

You can't know which wire's the right one. They are randomly defined in the bomb_init.sqs from the start.

Three things can happen when you cut a wire:

- The bomb explodes (duh)
- The timer stops and the bomb is defused
- The timer accelerates x2 (hehe)

Ok, you can guess which one is the right wire, but you can also kill a guard and steal his bombplan (similar to my codepad script)




This plan shows you that the green wire defuses the bomb, the blue wire accelerates the clock and the red wire blows you sky high.
Should be crystalclear. There are six possible situations and plans.
When you have found the bomb, three actions and the time left show up...



...but only when you are really close to it.

Usage
=====
- Copy the  timebomb, sound and plans folder in your own missions folder.
- Do the same thing with the description.ext and init.sqs (or merge it with your own)
- Run the script in the init of the object that represents the timebomb. (could be anything)

like this :

Code: [Select]
[this] exec "timebomb\bomb_init.sqs"
When you want a planholder (can also be anything, a man or a desk for example), you 'll need to run the plancarrier script in the init of that object.

When the planholder is an object (a desk) use :
Code: [Select]
[this] exec "timebomb\plancarrier.sqs"
When the planholder is a man or a member of a group there is an optional parameter .

Code: [Select]
[this,true] exec "TIMEBOMB\plancarrier.sqs"to assign that unit specific as planholder.
OR
Code: [Select]
[this,false] exec "TIMEBOMB\plancarrier.sqs"to assign somebody randomly from that group

Randompositions.sqs and posscript.sqs

It would be boring to find the bomb always on the same spot no?
Randompositions contains an array with all possible spots (positions), you can find those positons by running the posscript.sqs. Run the script on yourself (check the posscript mission to see how) , move around, find a good spot and click on the action. The position will be displayed in a hint. Write it down and add it to the _positions array in the randompositions script.
This takes some time, let me know if you know a faster way to do this.  

Ok, that's all I think.  :P
Check the init.sqs for more information. I will add a readme once I have my MS Word back  :)

Enjoy, the script combined with a hostage situation can be tense.

Oops, i almost forgot to say that you'll need editorupgrade102 for the testmission.  :)

Download HERE

***link updated 25-03-2005 23:35***

- Fixed a non-critical bug in the counter script.


 





 
 
« Last Edit: 06 Apr 2005, 17:29:42 by Blanco »
Search or search or search before you ask.

Offline nominesine

  • Former Staff
  • ****
  • I'm NOT back!
    • The IKB Forum
Re:Timebomb 3.2
« Reply #1 on: 25 Mar 2005, 13:41:37 »
Very impressive. Really good idea. Downloading it now.
OFPEC | Intel Depot
RETARDED Ooops... Retired!

Offline Pilot

  • Contributing Member
  • **
Re:Timebomb 3.2
« Reply #2 on: 25 Mar 2005, 16:46:22 »
ROFL!  I really liked the explosion when the player cuts the wrong wire! (that laptop sure was full of explosives!  :o)  Nice camera scripting here!  This script is great!  Very nice work! :thumbsup:

Offline Blanco

  • Former Staff
  • ****
Re:Timebomb 3.3
« Reply #3 on: 25 Mar 2005, 23:46:54 »
I'm glad you like it :)

That's right , the camerascene is a part of the script, but you can disable it with bombcam = false , check the init.sqs
Search or search or search before you ask.

Offline Pilot

  • Contributing Member
  • **
Re:Timebomb 3.3
« Reply #4 on: 26 Mar 2005, 17:04:26 »
Yeah, I saw that when I checked out your scripts (wow, that's complicated! :o).  The option to turn it on and off is very nice, thanks!  But I'm sure I won't use it, the camerascene is just too good to pass up! ;D

Offline General Barron

  • Former Staff
  • ****
  • Semper Fi!
Re:Timebomb 3.3
« Reply #5 on: 30 Mar 2005, 00:17:47 »
Lol! This script is a blast (Cheezy pun not intended)! :D Can't say as I really "beta-tested" it much, so I don't have anything to say except this is great stuff! It encoraged me to go back and work on a police/hostage type map I started a while back, only now I gotta include this!
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 dmakatra

  • Members
  • *
  • Better known as Armsty
Re:Timebomb 3.3
« Reply #6 on: 30 Mar 2005, 00:35:38 »
I haven't downloaded it (too lazy to boot up OFP) but I recommend resetting the variables that decide which is defusing, exploding or accelerating at each time == 0. At least until the player has found the bomb plan. Otherwise the player can save, try it. If it fails, load, try it, load, try it, etc. :)

:beat: *Gets Shot* :beat:

Offline Blanco

  • Former Staff
  • ****
Re:Timebomb 3.3
« Reply #7 on: 30 Mar 2005, 02:33:31 »
You got a point, but when they want to cheat, they will cheat.

AFAIK there are no commands to detect a savegame,  and he can still save the game & load when he"s starts cutting the wires.
When you give them unlimited savegames  via radio you can reduce his score by - 1000 for each time he uses it, but thats up to the missionmaker.

« Last Edit: 31 Mar 2005, 08:33:38 by Blanco »
Search or search or search before you ask.

Offline dmakatra

  • Members
  • *
  • Better known as Armsty
Re:Timebomb 3.3
« Reply #8 on: 30 Mar 2005, 10:23:12 »
Yes, there is a command. Sorta anyway.

? (time == 0)

:beat: *Gets Shot* :beat:

Offline Blanco

  • Former Staff
  • ****
Re:Timebomb 3.3
« Reply #9 on: 30 Mar 2005, 12:47:40 »
ah, explain.  :P
« Last Edit: 30 Mar 2005, 12:49:39 by Blanco »
Search or search or search before you ask.

Offline Platoon Patton

  • Members
  • *
  • "Barbecue" CreateVehicle getpos LLama
Re:Timebomb 3.3
« Reply #10 on: 30 Mar 2005, 18:08:12 »
Reserved variable "time" is reset to 0 if U use Savegame me thinks.

Or how a bug can be usefull  :-\
http://www.platoon-clan.com/ We always wellcome dedicated OFP players :)

http://www.european-combat-league.com/index.php To play with us in the best OFP league ;)

Offline Blanco

  • Former Staff
  • ****
Re:Timebomb 3.3
« Reply #11 on: 31 Mar 2005, 08:40:31 »
OK, time is that command that returns the time elapsed since the missionstart, but how can I use it in my script?
Do you have an example?

For now, I could change this

- Random assignment of the wires only when the bombplan is found, but what if you play it without the plan?  :-\


 


« Last Edit: 31 Mar 2005, 09:17:00 by Blanco »
Search or search or search before you ask.

DBR_ONIX

  • Guest
Re:Timebomb 3.3
« Reply #12 on: 05 Apr 2005, 19:32:00 »
What about setting a varible to either 1,2 or 3 at the start, round it up..
If it's 1, the red wire blows the bomb up, the blue wire speeds it up, yellow defuses it, and the bomb plan is pic 1.
If it's 2, the red wire defuses it, the blue wire blows it up, yellow defuses, and bomb plan is pic 2.
Same diea for 3.. :P

That was it's different each mission, not always same plan.

BTW, I assume this works in MP. Do I assume right?:P
- Ben

Offline Blanco

  • Former Staff
  • ****
Re:Timebomb 3.3
« Reply #13 on: 05 Apr 2005, 19:54:01 »
Euh, that's exactly what I did :

Code: [Select]
;;0 = Tbomb disarmed
;;1 = Time accelerates
;;2 = Tbomb explode

wires = []

_events = [0,1,2]
_colors = ["r","g","b"]

_r = random count _events
_r = _r - _r % 1
_event1 = _events select _r
_color1 = _colors select 0
_events = _events - [_event1]
wires = wires + [_color1,_event1]
_r = random count _events
_r = _r - _r % 1
_event2 = _events select _r
_color2 = _colors select 1
_events = _events - [_event2]
wires = wires + [_color2,_event2]
_r = random count _events
_r = _r - _r % 1
_event3 = _events select _r
_color3 = _colors select 2
wires = wires + [_color3,_event3]
;hint format ["%1",wires]

It is different each mission. In an other script I link the correct plan to each situation.
I have no idea it's MP compatible, never tested.

But you can't use more then one Tbomb per mission, to make that work I have to create dynamic boleans & variables. :P
So wires = [] become wires1 =[]  for the first bomb ; wires2 for the second bomb, and so on. I have to change a shitload of other variables into dynamic ones:

Boleans
cutgreen,cutblue,cutred,accel,dism,kaboem,starttimer,bombcam,
Global Variables
planfound,timer,wires,Bomb_act_dis and Planholder_act_dis  

 


« Last Edit: 05 Apr 2005, 20:07:45 by Blanco »
Search or search or search before you ask.

DBR_ONIX

  • Guest
Re:Timebomb 3.3
« Reply #14 on: 06 Apr 2005, 12:01:23 »
Ohhh, sorry, I've not tested script yet, and from what I read it looked and read like there was just the one bomb plan :P
I'll test it today, SP and multiplayer
- Ben

Offline Morglor9

  • Members
  • *
Re:Timebomb 3.3
« Reply #15 on: 09 Apr 2005, 18:19:25 »
great script Blanco! one question: how do you make it work without the randompositions script? i would like to make a mission with this (if that's alright) and i need the bomb to be in a certain place, as it will be important to the storyline.
Cymbaline

Offline Blanco

  • Former Staff
  • ****
Re:Timebomb 3.3
« Reply #16 on: 09 Apr 2005, 18:22:39 »
Easy, open the bomb_init script and delete the line :

Code: [Select]
[_thabomb] exec "randompositions.sqs"


Search or search or search before you ask.

Offline Morglor9

  • Members
  • *
Re:Timebomb 3.3
« Reply #17 on: 09 Apr 2005, 22:09:27 »
ok. thanks.
Cymbaline

Offline Pilot

  • Contributing Member
  • **
Re:Timebomb 3.3
« Reply #18 on: 10 Apr 2005, 03:24:51 »
Hey Blanco,

Me again.  I have one suggestion for you: Allow the player to choose the type of ordinance for the explosion.  I don't think the current version allows this.

Homefry31464

  • Guest
Re:Timebomb 3.3
« Reply #19 on: 10 Apr 2005, 04:24:17 »
For the time aspect, couldn't you just assign another variable to equal time, so that way it is dependent on that variable instead of the _time one?

Offline Blanco

  • Former Staff
  • ****
Re:Timebomb 3.3
« Reply #20 on: 18 Apr 2005, 15:43:30 »
Hey Blanco,
Me again.  I have one suggestion for you: Allow the player to choose the type of ordinance for the explosion.  I don't think the current version allows this.

What do you mean by "the type of ordinance for the explosion"?
The ammotype? Right now it's the laserguidedbomb.

For the time aspect, couldn't you just assign another variable to equal time, so that way it is dependent on that variable instead of the _time one?

I'm not using the _time variable in my scripts.
I'm not sure what you suggest actually.
I'm still searching how I can detect a loaded game.

« Last Edit: 18 Apr 2005, 15:46:14 by Blanco »
Search or search or search before you ask.

Offline Pilot

  • Contributing Member
  • **
Re:Timebomb 3.3
« Reply #21 on: 18 Apr 2005, 18:03:24 »
Quote
What do you mean by "the type of ordinance for the explosion"?
The ammotype? Right now it's the laserguidedbomb.
Yes, the ammotype.  I suggest you allow the player to choose whether it is a laserguidedbomb or a shell 125 or even a handgrenade.  It would allow the player to better "conform" the bomb to the situation.

Offline Blanco

  • Former Staff
  • ****
Re:Timebomb 3.3
« Reply #22 on: 19 Apr 2005, 07:46:27 »
Display_Position1.1

Positionscript has been updated. The position array is shown in an editfield in a dialog, simply select the text and use CTRL + C & CTRL + V to copy and paste it in your script for further use.
« Last Edit: 19 Apr 2005, 08:10:13 by Blanco »
Search or search or search before you ask.

pazuzu

  • Guest
Re:Timebomb 3.3
« Reply #23 on: 16 May 2005, 23:45:44 »
Is this script good for multiplayer coop?

Offline Blanco

  • Former Staff
  • ****
Re:Timebomb 3.3
« Reply #24 on: 17 May 2005, 04:46:47 »
I don't know, I don't have the resources to test in MP.
Search or search or search before you ask.

pazuzu

  • Guest
Re:Timebomb 3.3
« Reply #25 on: 18 May 2005, 01:43:48 »
I tried it with someone in multiplayer & they couldn't see the laptop but could see option to defuse in their action menu & did so. Then I tried cutting a wire & it blew me up but not the person I was playing with.

So I guess its not good for multiplayer. Too bad, I really like this script.

I tried codepad script too & it doesn't work in multi...

Is there any way it could be made to work in a coop?


Thanks.
« Last Edit: 18 May 2005, 03:08:23 by pazuzu »

Offline Blanco

  • Former Staff
  • ****
Re:Timebomb 3.3
« Reply #26 on: 18 May 2005, 05:17:58 »
Let's start with the beginning...

Quote
they couldn't see the laptop but could see option to defuse in their action menu & did so
.

Was the position of the laptop random or fixed?
How could you click on the action when the laptop was not visible, because the action is attached on the laptop ???

Search or search or search before you ask.

pazuzu

  • Guest
Re:Timebomb 3.3
« Reply #27 on: 18 May 2005, 07:49:34 »
LOL, I was playing with another person to see if he could defuse the bomb.

He shot the guy with the plan & was able to take the plan then searched for the laptop. He never saw the laptop but could see option in his action menu to cut wire, which he did & defused the bomb. Then I went to his position & I could see the laptop & option to cut wire so just for the heck of it I cut wire & it blew up killing me but not him. He said he didn't see explosion.

So I guess this script runs off local comp or something. Doesn't seem to work for other players in multi.

Oh btw, I was going through all your scripts & thought that Flattire script sounded good but the D/L link wouldn't work for me. Is this script still available?
« Last Edit: 18 May 2005, 07:51:57 by pazuzu »

Offline Blanco

  • Former Staff
  • ****
Re:Timebomb 3.3
« Reply #28 on: 18 May 2005, 18:33:25 »
Flattire script?

I remember I've' wrote two betascripts about that subject :

1- An old script to repair your car until it can move again. So when you hit a tree and you got a flat tire, the driver got an new action to repair the tire only.

http://users.telenet.be/blanco/Scripts/Repair.Abel.zip
 
2- A script to flatten a tire instantly by camcreating bullets in the tire itself.
 
http://users.telenet.be/blanco/Scripts/flattire.eden.zip
Search or search or search before you ask.

pazuzu

  • Guest
Re:Timebomb 3.3
« Reply #29 on: 18 May 2005, 19:08:18 »
Ya it was the repair one I wanted.

Thanks.

Offline OFPfreak

  • Members
  • *
  • Who is da operation flashpoint freak now, freak?!
    • OFP NFS mod
Re:Timebomb 3.3
« Reply #30 on: 28 Jun 2005, 03:54:13 »
I love this script! It doesn't deserve a 10. It deserves a 20 out of a 10 ;D!
Hey I was just wondering if you could have simple stuff like this:

an option to reactivate the bomb after its defused e.g. if you kill a hostage or something and set the time too.

I am going to try and make a mission looking like the movie "whatever its called" where somone is telling 2 cops to sprint to phone boots and stop the bomb from blowing but later it blows anyway so thats why I need that option.
ofp nfs REBORN! All new nitro, neon, customized cars, off-road, on-road, rally, bikes, racer models and more!
ofp nfs's homepage