Jump to content
Sign in to follow this  
the unknown

Minefield

Recommended Posts

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
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

@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

Please sign in to comment

You will be able to leave a comment after signing in



Sign In Now
Sign in to follow this  

×