Advertisement

Author Topic: Dismantle timebomb (cut wires)  (Read 1350 times)

0 Members and 1 Guest are viewing this topic.

Offline Blanco

  • Former Staff
  • ****
Dismantle timebomb (cut wires)
« on: 18 Nov 2003, 19:01:48 »
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 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?

Examplemission  in attachment, editorupgrade102 needed!

I think it works with OFP - CWC too.





« Last Edit: 18 Nov 2003, 22:33:15 by Blanco »
Search or search or search before you ask.

DBR_ONIX

  • Guest
Re:Dismantle timebomb (cut wires)
« Reply #1 on: 28 Nov 2003, 18:31:40 »
Had a go.. Pretty good.. But I have no idea of what time is left...
Could make an intresting mission :
Get in to town and defuse the bomb before it goes of at 13:28:00 (So you can use the watch)... This with carbombs would make an intresting mission.. There are two lots of "teams", east/west, prob, and you are a resistance (So both sides are hostile to you, and one lot is attack the other, and have place a bomb in somewhere like a police startion (This would be good, as you would most prob know people in there, as your part of the police, bomb squad...)


Only prob I can see is that when you trigger it, you see the bomb for a second of two (Look funny, though.. It's huuge :P)

My suggestd improvements : Hints ever 2 seoconds, with time remaining (Maybe just when your near the bomb, as if you were reading the clock/timer thing on it..)

Could make some intresting missions :D
- Ben

Kyle

  • Guest
Re:Dismantle timebomb (cut wires)
« Reply #2 on: 30 Nov 2003, 05:41:47 »
hmmm....i thought of this during the beta testing of my car bomb script.  I'm gonna download this and check it out.

Offline Blanco

  • Former Staff
  • ****
Re:Dismantle timebomb (cut wires)
« Reply #3 on: 01 Dec 2003, 21:27:00 »
Thx 4 the reply.  ;)


Quote
But I have no idea of what time is left...

Use the radio (Alpha) to start the counter.

I don't like the hints every 2 seconds, the "bling" sound drives me mad after a while. :P

But it's a good idea to make the counter visible only when the player's near the bomb. It's do-able, When I have the time I try it.



 
Search or search or search before you ask.

Offline Blanco

  • Former Staff
  • ****
Re:Dismantle timebomb (cut wires)
« Reply #4 on: 03 Dec 2003, 21:37:13 »
Ok, I changed several things...

- The bomb explodes when you try to shoot it.
- Time remaining only visible when you're close (1.5m) via a titletext message
- Added cutting-sound + kneeling-animation (Combattoputdown)
- reduced beep-volume & 3 different beep sounds (same ogg,different pitch)

Got some problems too...

problem1

- The addaction (cut green,cut blue, cut red) is attached to the bomb, I want it attached to the player when he's 1m from bomb.

I tried this :

Code: [Select]
-A 1th trigger

Condition : !cutgreen && player distance bomb < 1
Onactivation : id01 = player addaction ["cut green wire","cutgreen.sqs"]
Ondeactivation : player removeaction id01

- A 2th trigger

Condition : !cutblue && player distance bomb < 1
Onactivation : id02 = player addaction ["cut blue wire","cutblue.sqs"]
Ondeactivation : player removeaction id02

- a 3th trigger

Condition : !cutred && player distance bomb < 1
Onactivation : id03 = player addaction ["cut red wire","cutred.sqs"]
Ondeactivation : player removeaction id03


Well, I did this before with 1 addaction and it works great, but with 3 addactions there always one action that stays when I'm more than 1 meter from the bomb.
Are triggers too slow?

I tried it in a script with an if - then - else statement, and it looks simple when I see it in other scripts, but It never works when I try it! :P Need help.

problem2

I don't like the fact you need the editorupgrade for the script. I tried it with a "weaponholder" and add 1 pipebomb in it.
The problem is that you can pick it up...

I tried :

Code: [Select]
? bomb in weapons player : goto "kaboem"
...
#kaboem
"laserguidedbomb" createvehicle (getpos bomb)


Hmmm...Bomb is not a weapon...

What can I do to avoid that?

Also I need somebody to clean up the scripts, because there are i lot of conditions in my loops...
It think it can be solved with an if - then - else thing...


I will post a testmission tommorow...

Sorry for my English,... I hope I made myself clear  :-\


Search or search or search before you ask.

Offline Blanco

  • Former Staff
  • ****
Re:Dismantle timebomb (cut wires)
« Reply #5 on: 04 Dec 2003, 16:29:49 »
I tried to post it here but I recieved an error...

Quote
2: move_uploaded_file(/usr/local/www/ofpec/yabbse/attachments/TB_V2.1a.Noe.zip): failed to open stream: Permission denied
(/usr/local/www/ofpec/yabbse/Sources/Post.php ln 886

The file is 25kb??? 50 is the limit... no?

**edit**

I uploaded the mission in my briefcase (  :-\ sorry I dont have webspace)

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

To get access to the files :

ID : ftielemans
PW : dey8p7

in the folder NEW\TB_V2.1a.Noe.zip

The download won't take long, it's about 26kb

You need Resistance & editorupgrade102(not included)

Code: [Select]
Some bad guys have 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!

Improvements:

- The remaining time & actions are only visible when the player's about 1 meter from the timebomb. :)
- Added cuttingsound + kneeling-animation (an existing one)
- Reduced volume of the sound to make sure you can hear them only local.
- The timebomb explodes now when you try to shoot it.




« Last Edit: 04 Dec 2003, 19:00:13 by Blanco »
Search or search or search before you ask.

Zell

  • Guest
Re:Dismantle timebomb (cut wires)
« Reply #6 on: 14 Jan 2004, 12:07:24 »
hmmm seems to freeze up my computer at the get ready screen and i can't find any thing wrong, any ideas any one? has any one tested it?

Offline Blanco

  • Former Staff
  • ****
Re:Dismantle timebomb (cut wires)
« Reply #7 on: 14 Jan 2004, 18:56:30 »
Here's a mirror : http://www.coldfritescrisis.host.sk/be-studios/scripts/TB_V2.1a.Noe.zip Thx to PIKMOF -XCEL

if the link doesn't work, try save as target or copy & paste the url in your browser.

It's the same version.

@Zell

I don't know what's wrong. The only thing I can think about is a problem with the editorupgrade102.

The "bomb" infact is a closed laptop from editorupgrade1 but it's also in editorupgrade102 but you can't see it in the list (very confusing)

open the mission.sqm and search for the word "bomb", you will find this:


Code: [Select]
   class Vehicles
   {
      items=6;
      class Item0
      {
         position[]={4058.322510,23.490000,5126.943848};
         azimut=-179.925568;
         id=1;
         side="EMPTY";
         vehicle="AAA618";
         leader=1;
         skill=0.600000;
         text="bomb";

Now...
When you open the mission in the editor and doubleclick the "bomb" the AAA618 changes into Flagcarrier?!
Very annoying, but I don't think it crashes the game.

Try to use the editorupgrade102 instead of Kegetys editorupgrade1.1 (the pbo got the same name I think)

I've got a new version of the script where you can assign someone (specific or random) from an enemy group that carries a plan with information wich wire is the right one.
You can choose : Kill the guy who got the plan and find the bomb before it explodes or don't kill him and take a wild guess...
It also got a realistic counter:

"126 seconds left" is in the new version 02:06
(thx to HardRock)

Mission & script is done, so what keeps me from a release? :P

More time & webspace... :-\








 



« Last Edit: 14 Jan 2004, 19:15:10 by Blanco »
Search or search or search before you ask.

Zell

  • Guest
Re:Dismantle timebomb (cut wires)
« Reply #8 on: 16 Jan 2004, 05:28:56 »
ive got webspace if u want, heres my adress

theycallmenickandrew@hotmail.com

Zell

  • Guest
Re:Dismantle timebomb (cut wires)
« Reply #9 on: 16 Jan 2004, 11:19:46 »
ok, heres the new bomb mission lets hope it works for me

http://www.users.on.net/theandrews/TBv21aUpdated.Noe.zip

Offline Blanco

  • Former Staff
  • ****
Re:Dismantle timebomb (cut wires)
« Reply #10 on: 16 Jan 2004, 19:37:49 »
Thx for the webspace, Zell. When I got the time I send the new version 2 U. I hope it works for you.


***edit***
Updated?  ???

I don't get it?

I never uploaded that version. I saw some changes in the cutgreen.sqs,cutblue.sqs & cutred.sqs scripts & I dont understand why it's changed..

This is cutgreen.sqs (original)

Code: [Select]
?!starttimer : exit

bomb removeaction id03
player switchmove "combattoputdown"
cutgreen = true

~1.5
player say "cut"

~0.5

?wires select 0 == "g" : goto "1th"
?wires select 2 == "g" : goto "2th"
?wires select 4 == "g" : goto "3th"




#1th

?wires select 1 == 0 : dism = true;bomb removeaction id01;bomb removeaction id02
?wires select 1 == 1 : accel = true
?wires select 1 == 2 : kaboem = true;"laserguidedbomb" createvehicle getpos bomb

exit

#2th
?wires select 3 == 0 : dism = true;bomb removeaction id01;bomb removeaction id02
?wires select 3 == 1 : accel = true
?wires select 3 == 2 : kaboem = true;"laserguidedbomb" createvehicle getpos bomb
exit

#3th
?wires select 5 == 0 : dism = true;bomb removeaction id01;bomb removeaction id02
?wires select 5 == 1 : accel = true
?wires select 5 == 2 : kaboem = true;"laserguidedbomb" createvehicle getpos bomb

exit

This is the updated version (I never wrote this)

Code: [Select]
?!starttimer : exit

bomb removeaction id03
player switchmove "combattoputdown"
cutgreen = true

~1.5
player say "cut"

~0.5

?wires select 0 == "g" : selected = 1
?wires select 2 == "g" : selected = 2
?wires select 4 == "g" : selected = 3

?wires select selected == 0 : dism = true;bomb removeaction id01;bomb removeaction id02
?wires select selected == 1 : accel = true
?wires select selected == 2 : kaboem = true;"laserguidedbomb" createvehicle getpos bomb

exit


What's the use of selected? I don't think this works...

Anyway, Don't get me wrong, I'm not mad about it :) , I just don't understand the script.











Search or search or search before you ask.

Zell

  • Guest
Re:Dismantle timebomb (cut wires)
« Reply #11 on: 17 Jan 2004, 00:52:35 »
nope, I didn't change any thing I just got it off straight what you sent me and put it up

Offline Blanco

  • Former Staff
  • ****
Re:Dismantle timebomb (cut wires)
« Reply #12 on: 19 Jan 2004, 19:38:23 »
 ???  I never sent you an email with that version  ???

Whatever...

Here's the final version (I hope so)
http://users.pandora.be/ofptuts/TB3.zip

Editorupgrade102 Required! (included in zip)

mirror by Coldfrites : http://www.coldfritescrisis.host.sk/blanco/TB3.zip
(refresh (F5) or save as target if link doesn't work)


« Last Edit: 20 Jan 2004, 18:59:49 by Blanco »
Search or search or search before you ask.