Home   Help Search Login Register  

Author Topic: Destroy (or, at least, remove) in map objects  (Read 1542 times)

0 Members and 1 Guest are viewing this topic.

klavan

  • Guest
Destroy (or, at least, remove) in map objects
« on: 15 Dec 2004, 22:01:10 »
Hi all.
The AI seem quite unfrendly when becomes necessay for it to enter buildings, even if the building itself is very big. A solution could be open a breach in a wall, but...
The castle ruins (the bigger one) in Nogova is a wonderful place to set up a mission, but the passages through the walls seem not to be too much large for the AI to let my squadmates follow me into. So I've decided to test the possibility to blow up the wall, with the result to discover their apparent indestructibility.
I've tried with 3 satchels. Result: 0
I've tried with a trigger (object XXXXX) setdammage 1. Result: the same.
However, it seem like some objects can be destroyed (as I've exeprienced in the past) and others not (thats new for me).
 Or am I wrong?

Offline Tyger

  • Former Staff
  • ****
  • I was at OFPEC when it still had dirt floors...
    • OFPEC
Re:Destroy (or, at least, remove) in map objects
« Reply #1 on: 15 Dec 2004, 22:57:50 »
Hope you have Resistance. :P

You should have a Show IDs/Hide IDs button in the mission editor. Click on it till ids are shown. Then find the piece of wall that you want to breach, and get the object number.

Then make a trigger, with radio alpha, and type object *object's number* setDammage 1.
That will knock over walls but buildings just crumple, don't fall over.  :'( Can't use it on them.

If you want, you could create a script that would detect when you placed a satchel, then do the above for you. It would look something like this:

Code: [Select]
_wall = _this select 0
_bomber = _this select 1
_time = _this select 2
_wpn = _this select 3
_ammo = _this select 4

? _wpn != "put" || ? _ammo != "PipeBomb" : exit

hint format["You have %1 seconds before your breaching charge detonates.",_time]

~_time

_bomber action ["TOUCHOFF"]
_wall setDammage 1

exit

then just add this event handler to anyone who's going to use it (in their init line)

this addEventHandler ["fired",{[object *wall id*,this,*detonation time*,_this select 1,_this select 4] exec "*scriptsname*.sqs"}]

example:
this addEventHandler ["fired",{[object 12456,this,25,_this select 1,_this select 4] exec "breachWall.sqs"}]

« Last Edit: 15 Dec 2004, 23:09:09 by Tyger »
"People sleep soundly at night only because rough men stand ready to do violence on their behalf." - George Orwell

MSG Mike Everret - We Will Never Forget - '75-'08

Offline Tyger

  • Former Staff
  • ****
  • I was at OFPEC when it still had dirt floors...
    • OFPEC
Re:Destroy (or, at least, remove) in map objects
« Reply #2 on: 15 Dec 2004, 23:10:59 »
hehe, didn't see you mentioned Nogova.

Ignore the Resistance comment.  :P  ;D
"People sleep soundly at night only because rough men stand ready to do violence on their behalf." - George Orwell

MSG Mike Everret - We Will Never Forget - '75-'08

klavan

  • Guest
Re:Destroy (or, at least, remove) in map objects
« Reply #3 on: 15 Dec 2004, 23:12:29 »
I've tried with a trigger (object XXXXX) setdammage 1. Result: the same.

I've tried with and without ().
The dubt about the indestructibility of some object came up after trying to blow up some houses. In some cases the building went down with one satchel. In other 10 satchels seem to be not enough!!! ???
My specific need is to blow up the walls of the castle in order to allow my squadmates to enter the courtyard with me.
« Last Edit: 15 Dec 2004, 23:13:00 by klavan »

klavan

  • Guest
Re:Destroy (or, at least, remove) in map objects
« Reply #4 on: 15 Dec 2004, 23:16:45 »
I'll try your script (tomorrow) and then I'll report the effects.
It's time to go to bed, for me now.
« Last Edit: 15 Dec 2004, 23:17:14 by klavan »

Offline macguba

  • Former Staff
  • ****
    • macguba's operation flashpoint page
Re:Destroy (or, at least, remove) in map objects
« Reply #5 on: 16 Dec 2004, 01:05:27 »
It may be that you cannot destroy it.     Or, even if you can, the AI will still not be able to get through.     object xxx setDammage 1 is the best test.     Try the command on some other objects to make sure you have it working properly, and double check that you have the correct ID.

Walls, windows, doors and buildings generally are one of the game's weaknesses.    The best solution is usually to rethink the mission slightly:  work with the game's strengths.
Plenty of reviewed ArmA missions for you to play

klavan

  • Guest
Re:Destroy (or, at least, remove) in map objects
« Reply #6 on: 16 Dec 2004, 12:08:10 »
Code: [Select]
_wall = _this select 0
_bomber = _this select 1
_time = _this select 2
_wpn = _this select 3
_ammo = _this select 4

? _wpn != "put" || _ammo != "PipeBomb" : exit

hint format["You have %1 seconds before your breaching charge detonates.",_time]

~_time

_bomber action ["TOUCHOFF"]
_wall setDammage 1

exit

The script run OK, I've only changed line 6, removing the second "?", wich give an error message, but the wall is still there...
As stated by macguba, it could be better for me to relocate the area where the mission will take place.  :-\
That's really a pity....
Thanks guys.


bored_onion

  • Guest
Re:Destroy (or, at least, remove) in map objects
« Reply #7 on: 16 Dec 2004, 18:26:39 »
it might look unrealistic but surely you could delete the wall?

Offline Planck

  • Honoured
  • Former Staff
  • ****
  • I'm never wrong ....I'm just not always right !
Re:Destroy (or, at least, remove) in map objects
« Reply #8 on: 16 Dec 2004, 20:34:18 »
You can't really remove .wrp placed objects, the best you could do is damage or destroy them, but, some .wrp objects seem to be indestructable.


Planck
I know a little about a lot, and a lot about a little.

Offline Tyger

  • Former Staff
  • ****
  • I was at OFPEC when it still had dirt floors...
    • OFPEC
Re:Destroy (or, at least, remove) in map objects
« Reply #9 on: 16 Dec 2004, 23:15:23 »
i have a feeling the ruins wall ur talking about is one of those giant ones, right?

if it is, you cant destroy it. Otherwise you should be able to  ??? Atleast i can.  :P

"People sleep soundly at night only because rough men stand ready to do violence on their behalf." - George Orwell

MSG Mike Everret - We Will Never Forget - '75-'08