Harzach 2516 Posted June 9, 2012 Hi all - What I am trying to do is ostensibly quite simple - whenever any OPFOR unit enters a specific trigger zone, I want them to be deleted. Ultimately, I'd like for only specific units to be deleted, but for now, any detected unit is fine. I've been playing around with createvehicle/deletevehicle, various respawn scripts, etc, but my general understanding of the Arma scripting language is not yet where I'd like it to be. Again, this seems like a pretty simple concept, but I can't find an example of it anywhere. Thank you for any assistance you may provide! ---------- Post added at 22:30 ---------- Previous post was at 22:14 ---------- ...and of course, mere minutes after I post this, I find the answer. Share this post Link to post Share on other sites
max power 21 Posted June 9, 2012 It would be quite excellent if you could post / link to the answer and mark the thread as 'solved' :) Share this post Link to post Share on other sites
Harzach 2516 Posted June 9, 2012 I was waiting to see if I really did find the answer, and it seems that I did not - not completely. I found this topic: http://forums.bistudio.com/showthread.php?83280-Deleting-vehicle-AND-crew - which works great for deleting one specific vehicle and its crew. I forgot to mention that the ultimate goal involves a recurring sequence of spawning/despawning vehicles - a sort of loop, to create the effect of infrequent but consistent/predictable traffic. ---------- Post added at 00:19 ---------- Previous post was at 22:56 ---------- Well, at this point I guess I'd simply like to have it so that any unit that enters a trigger zone is deleted. Share this post Link to post Share on other sites
Harzach 2516 Posted June 9, 2012 (edited) OK, I've got it figured out, I think. It could probably be more elegant, but this is war. Everything revolves around this respawn script: http://www.armaholic.com/page.php?id=6542, and the deleteVehicle command. First, I created a path using markers - one for the spawn point, one for the despawn point, and as many as needed in between to keep the vehicles from using unwanted roads (or going off-road altogether). As they are functioning as waypoints, each is named sequentially (WP1, WP2, etc), with the exception of the spawn point (WS1). I then placed a vehicle at WS1, with the AIvcl_respawn_WP command in its init: At the despawn marker (WP2 in this example), I placed two trigger zones - WD1 and WD2. WD1 deletes the vehicle, while WD2 deletes the crew/passengers as they are unceremoniously dumped out. With this set-up, the vehicle will spawn at WS1 on startup, travel through WP1 to WP2 where it will despawn. It will then respawn at WS1. You can set up as many routes as you'd like, as long as they are all named differently, and you can place as many vehicles as you'd like, wherever you'd like (though near their intended route makes the most sense). You can control the number of respawns, as well as the respawn delay. Of course, any other OPFOR that wanders into the despawn zone will get zapped, so that still needs to be dealt with. Credit goes to Norrin for his respawn/move to WP script (linked above), as well as - of course - Mr Murray's guide. Edited June 9, 2012 by Harzach Share this post Link to post Share on other sites