Home   Help Search Login Register  

Author Topic: destruction inside trigger  (Read 2010 times)

0 Members and 2 Guests are viewing this topic.

gadolinite

  • Guest
destruction inside trigger
« on: 30 May 2003, 04:01:58 »
how is it you setdammage 1 to everything within a trigger area without having to type all the ID's, etc.  If this is not the way, what is, if it is possible???

 8)You guessed it, a scud impact script.

deaddog

  • Guest
Re:destruction inside trigger
« Reply #1 on: 30 May 2003, 07:42:43 »
Try this in the on activation field:

{_x setdammage 1} foreach thislist

Offline macguba

  • Former Staff
  • ****
    • macguba's operation flashpoint page
Re:destruction inside trigger
« Reply #2 on: 30 May 2003, 12:15:24 »
That would kill everybody, but I'm not sure it would damage all the buildings and trees.    I think you may have to do all the object IDs seperately .... but don't worry, as long as your area isn't toooooooo big it won't be as bad a job as you think.

The real question is how to return an array of all object IDs within a given distance of a certain point.     Then your scud could hit anywhere and you could destroy everything within the blast radius .... or even have rings of damage, if you were really clever.     Does anybody know how to do that?

Plenty of reviewed ArmA missions for you to play

gadolinite

  • Guest
Re:destruction inside trigger
« Reply #3 on: 31 May 2003, 00:17:11 »
this does not destroy the anything inside the trigger, maybe a better way to do this would be to get the trigger to return the name of the units and objects inside the trigger.  How would you do this?

Offline DrStrangelove

  • Members
  • *
  • Mr.Creative
Re:destruction inside trigger
« Reply #4 on: 31 May 2003, 11:16:17 »
{_x setdammage 1} foreach (thislist select 0)

Maybe this works ?

gadolinite

  • Guest
Re:destruction inside trigger
« Reply #5 on: 31 May 2003, 18:12:20 »
 :oThis still does not work, maybe I am just not setting it up properly.

 ???How does this command exactly work?

 ???What are the parameters of the trigger?

Offline Sui

  • Former Staff
  • ****
    • OFPEC
Re:destruction inside trigger
« Reply #6 on: 01 Jun 2003, 03:45:46 »
As far as triggers are concerned, the only units inside them are living ones.

Even if they're set to: Anybody Present

So if you place a tent inside a trigger, the trigger won't see it. Similarily, a trigger cannot see map entities (trees, buildings, bushes etc.)

Short of making a looping script that goes through every object on the island (all half a million of them ::)), I don't see how you can get a list without entering all the object ID's manually into an array... sorry ;)

Maybe there is some smart cookie out there who has discovered a cunning way of solving this one... but I'm afraid it's beyond me.

Offline LCD

  • Former Staff
  • ****
    • Everon Cartel
Re:destruction inside trigger
« Reply #7 on: 01 Jun 2003, 04:05:56 »
@ sui - it can b v. easy 2 enter all of da objects 2 array ;) just make it loop - no need 2 make it manualy

_i =1
#loop
arrrayname = arryname+[(object _i)]
_i=_i+1
goto "loop"

but u stil need 2 know how meny objects exactly dere r in da map  :-\ - ny1 can thin bout way of doin dat ?

LCD OUT

[edit] just thought dat i need 2 add dat dis thing may lag ur mision if u start checkin da 1/2 milion objects 2 cwich 1 of em is close ;)
« Last Edit: 01 Jun 2003, 04:07:13 by LCD »
"guess being the community has downsides .." - cheetah
Help Perfecting Da Next Best Thing - O-Team Beta

Offline Sui

  • Former Staff
  • ****
    • OFPEC
Re:destruction inside trigger
« Reply #8 on: 01 Jun 2003, 04:16:34 »
but u stil need 2 know how meny objects exactly dere r in da map  :-\ - ny1 can thin bout way of doin dat ?

Short of making a looping script that goes through every object on the island (all half a million of them ::))...

I wasn't kidding, fulla ;D

There are quite literally almost half a million objects on an island. I don't think the script would lag so much as it would take about 10 minutes to run... ;)

Offline LCD

  • Former Staff
  • ****
    • Everon Cartel
Re:destruction inside trigger
« Reply #9 on: 01 Jun 2003, 04:30:20 »
it surely wont take 10 mins 2 run - specialy if u dont put delay ;) :P i think it wil lag da game 4 bout... how much time does it take da game 2 process 200000 pbjects ;) - dat is more or less da num of objs on malden if i remember right  :o  ;D

but i stil donno (or didint think bout) a way 2 check if da (object _i) is object or not  :-\

somin like

? getpos (object _i) == "" : exit

or mebe

? typeoff (object _i) == "" :exit

wat do u think ?

LCD OUT
"guess being the community has downsides .." - cheetah
Help Perfecting Da Next Best Thing - O-Team Beta

Offline Sui

  • Former Staff
  • ****
    • OFPEC
Re:destruction inside trigger
« Reply #10 on: 01 Jun 2003, 04:56:59 »
Well... one way to find out for sure.

Who's game enough to try it? ;D

_i = 500000
#loop
~0.01
(object _i) setdammage 1
_i = _i - 1
? _i  > 0: goto "loop"
Hint "Aaaand, I'm spent"

Who's game... I'd do it, but I feel my Duron 800 isn't a fair representation of an adequate system these days ;)

[size=0.5]*Edit* Might need a hint message so you know when it's finished[/size]
« Last Edit: 01 Jun 2003, 04:59:55 by Sui »

gadolinite

  • Guest
Re:destruction inside trigger
« Reply #11 on: 01 Jun 2003, 06:36:40 »
what about the unitnames, what about the units and ID's within the trigger area only?  The loop would do objects for sure.  Some of the units, objects on the empty side will not have names.
« Last Edit: 01 Jun 2003, 06:39:32 by gadolinite »

Offline LCD

  • Former Staff
  • ****
    • Everon Cartel
Re:destruction inside trigger
« Reply #12 on: 01 Jun 2003, 10:55:13 »
@ sui - ill check it soon ;)  :P

@ Gad

make a trig

triger (size = covering da whole island) - repeadtly
name = hit
condition anybody present
condition field = shot

now wen u shot da misle do

hit setpos getpos (DaPlaceDaMisleHits)
shot = true
~0.5
"_X setdammage 1" foreach list hit
~5
shot = false
exit

think dat wil work ;)

LCD OUT

"guess being the community has downsides .." - cheetah
Help Perfecting Da Next Best Thing - O-Team Beta

Offline LCD

  • Former Staff
  • ****
    • Everon Cartel
Re:destruction inside trigger
« Reply #13 on: 01 Jun 2003, 21:05:56 »
sui - deres a prob w/ dat  >:(

everytime i try 2 do somin w/ unreal object (like object 1 on desert island) - it ctd - meens det i have no way 2 check if da object is realy dere cuz it crashes everytime i try ::)

LCD OUT
"guess being the community has downsides .." - cheetah
Help Perfecting Da Next Best Thing - O-Team Beta

Offline Sui

  • Former Staff
  • ****
    • OFPEC
Re:destruction inside trigger
« Reply #14 on: 02 Jun 2003, 02:08:02 »
Hmm... there' probably no object 500,000..

Try this instead:

_i = 0
#loop
~0.01
(object _i) setdammage 1
_i = _i + 1
hint format ["Object Number: %1\n\nTime taken: %2", _i, _time]
? _i  > 0: goto "loop"

And see what the last hint message says before you crash to desktop ;)