OFPEC Forum
Editors Depot - Mission Editing and Scripting => OFP - Editing/Scripting General => Topic started by: SilentHunter on 11 Oct 2003, 21:23:45
-
Hiâ€Â¦
Does anyone know how to destroy buildings within a trigger and within 55 meters of the player?
I started off using the â€Ëœlist' command to find out what units within a trigger will activate it, and then how many of the units were close enough to me, all it did was kill me and various other active units, but as far as I know there is no way of getting buildings created during game using the â€Ëœcamcreate' command to be recognised by a trigger.
-
Does anybodye understand what you're asking for?
??? I don't ???
Try to read your question, as you would be somebody who
doesn't know what you want to do. Then decide if it's
possible to figure out what you mean ;)
Do you want to:
destroy houses?
kill units within 55 m of the player?
create houses?
let units activate a trigger?
list units in a trigger?
???
~S~ CD
-
LET'S DUMM THIS DOWN A BIT - my fault :'(
Does anyone know where I can find a script that...
Firstly
LISTS BUILDINGS THAT ARE WTHIN A TRIGGER, size 12,800 square, (the complete size of a 10X10 map)
Secondly
FINDS OUT WHICH ONES ARE WITHEN 55 METERS OF THE PLAYER
Thirdly
DESTROYS THEM NOT DELETES THEM
-
Triggers cannot detect buildings, so don't bother with those at all. There is a command "nearestbuilding" which returns the building closest to a unit. It may only have a range of 50 meters though, like the nearestobject command. I'd start with trying out the "nearestbuilding" command (look it up in the reference).
Oh, and you aren't going to be able to find a script like this "premade". You'll have to write it yourself or have sombody write it for you. ;)