Forum

> > Stranded II > Scripts > Kill units in a certain range
ForenübersichtStranded II-Übersicht Scripts-ÜbersichtEinloggen, um zu antworten

Englisch Kill units in a certain range

1 Antwort
Zum Anfang Vorherige 1 Nächste Zum Anfang

alt Kill units in a certain range

Stranded_Guy2910
User Off Offline

Zitieren
I'm having problems with this script. I want to kill all the units with the raptor behaviour in a certain range. I tried this script:
1
2
3
closemenu;
$unit=(count_behaviourinrange("unit","raptor",300));
kill $unit;

This event happends when I click on the button of my dialogue. The problem is that when I click on the button I die instead of the raptor unit.

alt Re: Kill units in a certain range

DC
Admin Off Offline

Zitieren
count_behaviourinrange - do you really think that this command returns a unit ID?
also how is one single call of "kill $unit" supposed to kill more than one single unit?

what you need here is a loop which loops over units, checks the distance and kills them if they are in range.
Zum Anfang Vorherige 1 Nächste Zum Anfang
Einloggen, um zu antworten Scripts-ÜbersichtStranded II-ÜbersichtForenübersicht