Jump to content
Sign in to follow this  
nukey

Destroy building/bridge etc

Recommended Posts

Can anyone help me with this problem, all i want to do is destroy the bridge or building, i thought it would be the same as destroying a unit. I've got the ID18193 and in a trigger condition,ive put !alive ID18193, and on the act. I've just put a hint in, to see if it works which it doesn't...

thank you for your help with yet another newbie.. :)

Share this post


Link to post
Share on other sites

Put somethink like this in the init file if you have one.

This will the remove the objects that you want removed.

Obviously chage ID's to the relevnt objects

http://www.fusion-squad.eu/

//;; Clear out some Walls to pass through more easily

_Wallpos = getMarkerPos "Wall Marker1" ;

_Wallpos nearestObject 30780 setDamage 1;

_Wallpos = getMarkerPos "Wall Marker1_1" ;

_Wallpos nearestObject 31232 setDamage 1;

_Wallpos = getMarkerPos "Wall Marker1_1_1";

_Wallpos nearestObject 30799 setDamage 1;

_Wallpos = getMarkerPos "Wall Marker1_2";

_Wallpos nearestObject 597501 setDamage 1;

_Wallpos = getMarkerPos "Wall Marker1_3" ;

_Wallpos nearestObject 31289 setDamage 1;

_Wallpos = getMarkerPos "Wall Marker1_4" ;

_Wallpos nearestObject 30810 setDamage 1;

_Wallpos = getMarkerPos "Wall Marker1_5" ;

_Wallpos nearestObject 31280 setDamage 1;

_Wallpos = getMarkerPos "Wall Marker1_6" ;

_Wallpos nearestObject 31279 setDamage 1;

_Wallpos = getMarkerPos "Wall Marker1_7" ;

_Wallpos nearestObject 31277 setDamage 1;

_Wallpos = getMarkerPos "Wall Marker1_8" ;

_Wallpos nearestObject 31241 setDamage 1;

_Wallpos = getMarkerPos "Wall Marker1_9" ;

_Wallpos nearestObject 31215 setDamage 1;

Share this post


Link to post
Share on other sites

Is what you want is to have the trigger activate when the building/bridge is destroyed?...If so, read on...

Ok, so the problem is that unlike an AI/vehicle/player or other unit, the game may not necessarily "know about" a building or other map object without a unit nearby to reference or "monitor" it. I imagine this is related to how the game streams map data, regardless, you need to have something nearby to use to "find" the object.

So, you need to use the nearestObject command

The easiest/best way to do this IMO is the following:

In the editor place a game logic on or at least withing 50m of the building you want to monitor. Give it a unique name. for this example let's call it "myLogic".

Next, put this in the condition line of your trigger:

((getDammage (position myLogic nearestObject 18193)) == 1);

So if 18193 is the ID number of the building you want to "monitor" is destroyed the trigger should activate.

If what you want to do is what Bacon's describing (actually destroy the object) you can do that of course, but it works off the same principal (it uses the marker to reference the object.

Good luck!

Share this post


Link to post
Share on other sites

Loyalguard you are a star my man,thanks for your prompt help,much appreciated.

Share this post


Link to post
Share on other sites

Can i pick your brains some more please!?

Say if my bridge has 3 IDs marked on it and i would like to display a message when all 3 parts have been destroyed. Wot you said above works a charm,its just i would like to extend the damage to all 3 parts before the message is produced....any ideas????

Share this post


Link to post
Share on other sites

Thank you, as simple as "and" I must of try'd everything else but that!!

Cheers again :)

Share this post


Link to post
Share on other sites

how do i destroy all objects (including trees, actually, trees are all im looking for, but it's a forest:D) in a marker area?

Share this post


Link to post
Share on other sites

Is there any way to set buildings lockable? Is it possible to use waypoint DESTROY on a building?

Share this post


Link to post
Share on other sites

Unless you want to play with the config files the only other way to keep a door locked would be to keep shutting it.

Doors have different names so you will have to find the correct name and number for the building your trying to lock.

Rather than use ID numbers for the house I'd rather give it a name and then you can treat it like any other object.

Place a trigger over the building and group the trigger to the building and set it up as follows

Cond TRUE

On Act

housename = (thislist select 0) ; call { [] spawn {  while{true}do{  if(housename animationPhase "dvere1" > 0)then{housename animate ["dvere1",0]};  sleep 0.1;  };  }}   

I'm not sure I understand what you want to do with the waypoint.

A destroy waypoint is more like a wait until destroyed waypoint. A unit will move to the object and when destroyed it will move on, it won't force the units to destroy it.

Share this post


Link to post
Share on other sites

Hi guys, What is wrong with this:

(position bridgeGL nearestObject 123456) setDamage 1

I'm getting error message "unknown operator nearestObject"

I wanna destroy a bridge to activate a trigger.. this is in OFP.. sorry if it's the wrong forum

Edited by Circassian

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  

×