Home   Help Search Login Register  

Author Topic: Timebomb 3.3  (Read 6090 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