Home   Help Search Login Register  

Author Topic: Bomb disarming  (Read 2055 times)

0 Members and 1 Guest are viewing this topic.

Offline Pr0ph3t

  • Members
  • *
Bomb disarming
« on: 16 Mar 2005, 14:46:41 »
Anything we could do that would start a little disarm bomb sequence? I dunno if this could be scripted or has to be made in an addon..

What do you think? I've been thinking of incorporating this into my campaign.. But I have no idea where to start.. Is it possible first of all?

-----------------------------------------

Offline RujiK

  • Members
  • *
  • KoKo Puh-Fizzles!
Re:Bomb disarming
« Reply #1 on: 16 Mar 2005, 20:08:42 »
Simple.
Assuming you already know some scripting, this will work:
Code: [Select]
_bomb = camcreate "LASERGUIDEDBOMB" getpos _pos

_bomb addaction ["Disarm that bomb!","Disarm.sqs"]
_pos = getpos _bomb
;this lockpos has to be here to prevent the bomb from falling and exploding.
#lockpos
_bomb setpos _pos
goto"lockpos"

For disarm.sqs all you'd really have to do is deletevehicle and run some cutscene, or you could just have that script terminate a countdown.
I like your approach, lets see your departure.
Download the New Flashlight Script!

Kyle Sarnik

  • Guest
Re:Bomb disarming
« Reply #2 on: 16 Mar 2005, 21:51:51 »
Three scripts (not tested)

addaction.sqs
Code: [Select]
_pos = _this select 0
; the pos of where the bomb is supposed to be
_unit = _this select 1
; any unit with a satchel charge

_unit fire ["pipebomb","put","put"]
~1
_bomb = nearestobject [_unit,"pipebomb"]
_bomb setpos _pos
[_bomb,_unit] exec "timer.sqs"

#loop1
? Isnull _bomb : exit
_distance = player distance _bomb
? _distance <= 3 : goto "addaction"
; can change 3 to anything that fits your mission
goto "loop1"

#addaction
_ID = player addaction ["Disarm Bomb","disarm.sqs"]
goto "loop2"

#loop2
? Isnull _bomb : exit
_distance = player distance _bomb
? _distance > 3 : goto "remaction"
; again change 3 to same number as before
goto "loop2"

#remaction
player removeaction _ID
goto "loop1"

timer.sqs
Code: [Select]
_bomb = _this select 0
_unit = _this select 1

_n = 0
_t = 60
; _t = bomb timer in seconds

#loop
~1
_n = _n + 1
? _n >= _t  : goto "boom"
goto "loop"

#boom
_unit action ["TOUCHOFF"]
exit

disarm.sqs
Code: [Select]
_obj = _this select 0
_player = _this select 1
_ID = _this select 2

? _player != player : exit
_player removeaction _ID
_player playmove "CombatToMedic"
~2
_bomb = nearestobject [_player,"pipebomb"]
deletevehicle _bomb
_player sidechat "Bomb disarmed."
exit

DBR_ONIX

  • Guest
Re:Bomb disarming
« Reply #3 on: 20 Mar 2005, 18:36:21 »
There is a script on the forum where you have to select which wire to cut (Clichéd, but it works :P)
Beta testing bit I think
- Ben

Offline Speeder

  • Members
  • *
    • OFP.nu
Re:Bomb disarming
« Reply #4 on: 13 Apr 2005, 19:31:28 »
What if:

You make a bomb device. The Timer can be set ingame, and displayed ingame, and a code sould be set too.

When you come near the bomb, an Action will give you the opputunity to disarm the bomb.

If you press the disarm bomb action a dialog should appear where you can enter a code to disarm it, if wrong code is entered twice then the bomb explodes immidiately. If you enter wrong doe once you should still have the possibility to move away from it, and obtain the code somewhere in the game.

Now - here it come. A piece of paper on which you can set a texk would be cool to. That way the code could be on the paper which the player must find, to disarm the bomb before it explodes.


Would ANYone please make this for me. I've been looking for something like this for ages.
There are 10 kinds of people in this world. Those who get it, and those who don't.

Offline greg147

  • Contributing Member
  • **
    • Royal Air Assault Battalion
Re:Bomb disarming
« Reply #5 on: 13 Apr 2005, 22:00:05 »
Royal Air Assault Battalion - [L/Cpl] Greg
RAAB

Offline Speeder

  • Members
  • *
    • OFP.nu
Re:Bomb disarming
« Reply #6 on: 14 Apr 2005, 08:27:09 »
your right - that is what I need, but as an addon, and not a script. - It gets too complicated when you have to set it up each time.
There are 10 kinds of people in this world. Those who get it, and those who don't.

Offline Speeder

  • Members
  • *
    • OFP.nu
Re:Bomb disarming
« Reply #7 on: 14 Apr 2005, 08:39:22 »
and I don't want ramndom placement - I just want it to be where I put it in the mission editor :)
There are 10 kinds of people in this world. Those who get it, and those who don't.

Offline Blanco

  • Former Staff
  • ****
Re:Bomb disarming
« Reply #8 on: 14 Apr 2005, 12:40:55 »
I agree, it would be easier with a addon, but I'm not an addonmaker.
Feel free to use/modify my script (timebomb or codepad) and implement it in your addon.
@speeder To get rid of the random positions, just read my last post in the topic.
« Last Edit: 14 Apr 2005, 12:42:33 by Blanco »
Search or search or search before you ask.

Offline Speeder

  • Members
  • *
    • OFP.nu
Re:Bomb disarming
« Reply #9 on: 16 Apr 2005, 09:44:45 »
anyone up for makig this like an addon?
There are 10 kinds of people in this world. Those who get it, and those who don't.