the unknown 0 Posted December 23, 2006 Hi, I am trying to make a minefield script that places a mine at every tank that enters the trigger area. I am useing the createmine command. There is someting wrong in the script that doesnt place the mine at the tank I got no clue why it doesnt work. Does anyone know what wrong with this script. <table border="0" align="center" width="95%" cellpadding="0" cellspacing="0"><tr><td>Code Sample </td></tr><tr><td id="CODE">_Trigger = _this select 0 _list = List _Trigger _Tanks = "Tank" CountType _list _pos = getpos foreach _tank "createMine ["MineMine", _x, [], 0]" ForEach _Tanks exit The Unknown Share this post Link to post Share on other sites
Mr-Murray 0 Posted December 24, 2006 Hi! Try my mine example Mr-Murray´s Mines Regards, Mr-Murray Share this post Link to post Share on other sites
ManDay 0 Posted December 24, 2006 Hi,I am trying to make a minefield script that places a mine at every tank that enters the trigger area. I am useing the createmine command. There is someting wrong in the script that doesnt place the mine at the tank I got no clue why it doesnt work. Does anyone know what wrong with this script. <table border="0" align="center" width="95%" cellpadding="0" cellspacing="0"><tr><td>Code Sample </td></tr><tr><td id="CODE">_Trigger = _this select 0 _list = List _Trigger _Tanks = "Tank" CountType _list _pos = getpos foreach _tank "createMine ["MineMine", _x, [], 0]" ForEach _Tanks exit The Unknown Look countType! That returns the number of Units - not the units themself! Instead, you got to go through each element in _list manually and check whether it fits the exspected type. Then you can kill it if it does. Share this post Link to post Share on other sites
the unknown 0 Posted December 24, 2006 @Mr-Murray Your script works great and unless there is some hidden ting with the mines you placed i take it they are just for the show. Thanks @ManDay Thanks for your help anyway. The Unknown Share this post Link to post Share on other sites