Jump to content
Sign in to follow this  
Blanco

Timebomb script

Recommended Posts

I 've made a testmission where you can dismantle a timebomb (but in the mission it's laptop... )  by cutting one of the (virtual) colored wires.  (a lethal weapon *x* scenario)

When you're close to the bomb, three actions appear : Cut red wire, cut blue wire & cut green wire.

Also three different things that could happen when you cut one:

- The bomb explodes

- The timer stops

- The timer accelerate x2

You can't know which wire's the right one. They were randomly defined in the bomb_init.sqs at the start of the mission.

In the testmission first you need to start the timer via a radiotrigger, then listen to the beeping sound and find the laptop. Choose a wire to dismantle it, you got max 2 chances to dismantle it. The timer counts down from 250 sec to 0, but you can change that in the init.sqs. Search for :

 

limit = 250

...and change the 250 in the time you want.

During my tests I couldn't find any bugs, but I'm my own betatester, so I guess there are still issues...

I needed 6 scripts & 3 triggers & too much boleans & global variables, but I think it can be done easier,

If you know how, be free to make it happen, so I can learn something...:)

I would be nice if some1 can clean the code or make this work in MP, because I don't have a clue how to work with addaction(s) in MP. Also I had some problems with counters in MP in the past.

How can I make addaction work for every player in a MP mission?

I think it works with OFP-CWC too.

dl the test (editorupgrade102 needed!)HERE

If the link does'nt work, click right mousebutton and choose Save as, it's a lot faster...

**edit** typo

Share this post


Link to post
Share on other sites
Quote[/b] ]Cut red wire, cut blue wire & cut red wire.

Why are there two red wires? Isn't there a yellow/green wire or something?

[Gareth Gates must die]

Share this post


Link to post
Share on other sites

yes, you're right,sorry crazy_o.gif

It red, blue & green

Actually, the colors doesn't matter, The wires are not visible or somebody have to make an addon bomb for it. j/k

Share this post


Link to post
Share on other sites

I haven't opened it yet, but sounds really cool!

If you "addaction" to an object then any player that gets near the object will see it on their menu.

Share this post


Link to post
Share on other sites

r1c0cH3T, what do you mean?... more random rock.gif

I got 3 wires & 3 events, how can I randomise it more...

_event1 =>  bomb is dismantled

_event2 =>  Time accellerates

_event3 =>  bomb explodes

"r" = redwire

"g" = greenwire

"b" = bluewire

<table border="0" align="center" width="95%" cellpadding="0" cellspacing="0"><tr><td>Code Sample </td></tr><tr><td id="CODE">

;==== bomb_init.sqs ===

wires = []

_events = [0,1,2]

_colors = ["r","g","b"]

_r = random count _events

_c = random count _events

_r = _r - _r % 1

_c = _c - _c % 1

_event1 = _events select _r

_color1 = _colors select _c

_colors = _colors - [_color1]

_events = _events - [_event1]

wires = wires + [_color1,_event1]

_r = random count _events

_c = random count _events

_r = _r - _r % 1

_c = _c - _c % 1

_event2 = _events select _r

_color2 = _colors select _c

_colors = _colors - [_color2]

_events = _events - [_event2]

wires = wires + [_color2,_event2]

_r = random count _events

_c = random count _events

_r = _r - _r % 1

_c = _c - _c % 1

_event3 = _events select _r

_color3 = _colors select _c

wires = wires + [_color3,_event3]

;hint format ["%1",wires]

Or how can I make it easier? rock.gif

Share this post


Link to post
Share on other sites

I uploaded a mission with an improved version of my timebombscript

Timebomb_2.1a by Blanco

**Changed - Added**

- Actions and remaining time are only visible when the player's about 1 meter distance from the timebomb.

- The bomb explodes now when you try to shoot it.

- Added cutting sound & kneeling animation (an existing one)

- Reduced the volume of all sounds, so can hear them only local.

I don't have webspace. sad_o.gif

I uploaded the mission into my briefcase :

http://au.f2.pg.briefcase.yahoo.com/

To get access to the files :

Yahoo!ID : ftielemans

Yahoo!Password : dey8p7

Folder NEW\TB_V2.1a.Noe

It won't take long it's about 26kb

You need resistance & the well known addon : editorupgrade102

The mission :

Some bad guys put a timebomb in one of the four buildings in the red squared area (check map).

Your mission : find the bomb and dismantle it by cutting one of the three colored wires.

A hint : You can hear the bomb ticking... You got 5 minutes. Good luck!

Share this post


Link to post
Share on other sites

Please sign in to comment

You will be able to leave a comment after signing in



Sign In Now
Sign in to follow this  

×