OFPEC Forum

Editors Depot - Mission Editing and Scripting => OFP - Editing/Scripting General => Topic started by: NightJay0044 on 19 Oct 2006, 04:52:13

Title: Blowing up a bridge (How?)
Post by: NightJay0044 on 19 Oct 2006, 04:52:13
Hi, I'm testing and trying to figure out how a player can take his satchel charges and blow up a bridge.

I'm using the BAS Island "tonal" I think it is.

Do you have to use the ID's in the in-game editor?

Basically I just want to be able to walk up to a bridge, place my charges and back away, then detonate.

Anyone know how to do that?  ???

Thanks
NightJay0044
Title: Re: Blowing up a bridge (How?)
Post by: marcus3 on 19 Oct 2006, 05:39:05
With the action button?
Title: Re: Blowing up a bridge (How?)
Post by: XCess on 19 Oct 2006, 05:54:39
Bridges have very high armour values, bt can still be destroyed with satchel charges. I believe you need around 5 in total, or maybe 6, play around to find out how many.

I would suggest either using a backpack addon to carry the satchels, or a vehicle loaded up with satchels, unless you want a script to destroy it, which would use ID numbers, for example :

 (object #####) setDammage 4

Well, I think that's the right syntax IIRC.
Title: Re: Blowing up a bridge (How?)
Post by: macguba on 19 Oct 2006, 12:00:04
You may also be able to setdammage the bridge to 0.5 or something, so that it looks ok but will blow up with an ordinary number of satchels.
Title: Re: Blowing up a bridge (How?)
Post by: NightJay0044 on 20 Oct 2006, 19:54:01
I think I just tested my own answer to the problem.

Well thanks for the tips. The one that worked was the bridge had more armour on it then expected.

Basically I didn't place enough satchel charges.

Which then brings me to my next question.

If an objective in the mission breifing is to destroy the bridge. How to you get OFP to read the objective, so once the bridge is destroyed it will say "objective done"?

You know what i mean?
Title: Re: Blowing up a bridge (How?)
Post by: bedges on 20 Oct 2006, 19:56:27
Code: [Select]
?(getdammage (object bridge_object_number) >=1) : "1" objstatus "done"
Title: Re: Blowing up a bridge (How?)
Post by: NightJay0044 on 23 Oct 2006, 23:54:08
Quote
?(getdammage (object bridge_object_number) >=1) : "1" objstatus "done"

I understand that this is the code of line for a typical field in the editor.

But....the part of the line that says "(object bridge_object_number) >=1)

Am I supposed to leave it like that?
Or am I Supposed to specify a certain term or name for each of those parts?

Becuase if I just copy and paste that line it's not going to get the identification of the bridge is it? Becuase there is more then 1 bridge around the bridge that I'm getting.

Thanks.
Title: Re: Blowing up a bridge (How?)
Post by: macguba on 23 Oct 2006, 23:57:07
Never, EVER copy and paste something from the forum directly into your mission.     It almost never works.  You need to understand what you are doing and check it - forum answers frequently contain typos, or are too general to work without editing.

In this case, replace

bridge_object_number

with the object number of the bridge in question.   You can get this by clicking on ShowIDs and zooming in close in the mission editor.   If the bridge has been placed by you, then name it and use the name instead of 'object xxxx'.
Title: Re: Blowing up a bridge (How?)
Post by: NightJay0044 on 24 Oct 2006, 05:03:31
Good advice so far but still more questions...I'm going to test the Nogova Bridge. I checked it looks like that has about 7 "ID Numbers"

Is it okay to just use one or what code can I input if I want to use more then one?


Title: Re: Blowing up a bridge (How?)
Post by: macguba on 24 Oct 2006, 10:54:17
Experiment and find out.   ;)

Actually it sounds as if each section of the bridge may have its own object ID.   Or maybe the other ones are lamppost or something.   
Title: Re: Blowing up a bridge (How?)
Post by: Chris Death on 24 Oct 2006, 11:17:17
The nogova bridge is an arrangement of more objects being put together.  ;)

If you want to make it unpassable you just need to destroy one of those objects.  :)

~S~ CD