Home   Help Search Login Register  

Author Topic: Killing units at certian trigger height...  (Read 521 times)

0 Members and 1 Guest are viewing this topic.

Iwesshome

  • Guest
Killing units at certian trigger height...
« on: 25 Apr 2003, 23:08:54 »
In my mission I start of with a lot of units in the beginning which my cause lag so I want to kill some off to help eliminate that issue in certain ways.

Group Kill?

"_x setdammage 1" foreach units Alpha

Unit Kill?

"_x setDammage 1" foreach thislist

Trigger kill

Found this but I don't understand how to set it up.... I want my groups to repel behind a building and the kill them off… then delete them away. I don't want the guys to be killed or deleted till they reach the ground.

This is a trigger setup so it can only be triggered from ground, not in a chopper.

Trigger activated by west with these conditions;

this and not ((chop1) in thislist)
this and not ((chop1) in thislist) and not ((chop2) in thislist)

First one is for one chopper, second for two.

My actual line for one with 6 choppers is:

expCond=this and not((chop10) in thislist)and not((chop11) in thislist)and not((chop20) in thislist)and not((chop21) in thislist)and not((chop22) in thislist)and not((chop23) in thislist)"


Update

Delete Script

Came across this I will add to trigger if I can figure out the height issue...

Code: [Select]
[groupname] exec "deletecheck.sqs"

_group = _this select 0
_units = units _group

#loop
?(("Alive _x" count _units) == 0): goto "remove"
~random(5) + 5
goto "loop"

#remove

~40
"deletevehicle _x" foreach _units

exit

Conclusion?

So to wrap this up I need to activate a trigger once the troops hit the deck... Ideas?

Activation Field: "_x setdammage 1" foreach units Alpha; [groupname] exec "deletecheck.sqs"

Does this look right.... Can't try it out yet   :'(

Thanks for the help... IW
« Last Edit: 25 Apr 2003, 23:36:25 by IW »

Offline Sui

  • Former Staff
  • ****
    • OFPEC
Re:Killing units at certian trigger height...
« Reply #1 on: 26 Apr 2003, 04:15:20 »
Yikes! For a start, don't use that line:

this and not ((chop1) in thislist) and not ((chop2) in thislist)

It is seriously flawed. It means if chop1 or chop2 are in the trigger, it won't activate at all!

For your specific scenario, you could try something like this:

Trigger

Radius: 0,0
Condition: Vehicle Present     Grouped with player
Condition Field: (player in thislist) and (getpos player select 2 < 2)
Onactivation field: "_x setdammage 1" foreach units alpha

First, to select 'Vehicle Present' you will need to hit F2 and drag a line from the trigger to the player unit.
That trigger will activate when the player is in the trigger, and gets to within 2 metres of the ground. The trigger will then kill all the units in group alpha.

However, I don't think that will solve your CPU slowdown problem. A unit out of sight doesn't use that much more runtime than if it doesn't exist at all. I suggest you simply don't have some of the units to start with ;)

[size=0.5]Edit: oops, I mis-read the question a bit... that should hopefully sort it now ;)[/size]
« Last Edit: 26 Apr 2003, 04:20:19 by Sui »

Iwesshome

  • Guest
Re:Killing units at certian trigger height...
« Reply #2 on: 26 Apr 2003, 17:27:11 »
Thanks for the response  ;D

Question though.... If I used the delete script that I posted wont that reduce lag on the computer because it no longer is in the game?

IW

Offline Sui

  • Former Staff
  • ****
    • OFPEC
Re:Killing units at certian trigger height...
« Reply #3 on: 27 Apr 2003, 02:23:38 »
Hmm... that's debateable.

You could also delete them from a trigger...

I think because they've existed in the first place, they are already initialized and loaded into memory.

In my experience, deletevehicle'ing a whole heap of units after moving from an area is overrated. Having said that, I still do it ;)