Jump to content
ToastMemes

Need help making Tesla Tower

Recommended Posts

I'm quite new to Arma 3 Scripting and whilst i have a couple very small scripts I made my knowledge is not yet sufficient.

For a Mission I'm trying to make a Tesla tower with which i place an object which looks like a tesla tower and a Trigger zone underneath as the zone in which the "Tesla Tower" can attack.
Attacking as in when players enter the zone Lightning Bolts will randomly hit around the Tesla Tower

 

This is what I currently have:


_lightninghandle = [] spawn {

while {ScriptRunning} do
{

_tesla = (tesla1 getRelPos [(random ((triggerArea tesla1) select 0)), random(360)]);
 
[_tesla,nil,true] spawn BIS_fnc_moduleLightning;

sleep (10 + random 20);

};
};

I know this script is very primitive compared to other scripts but I can't seem to get it to work, every time I enter the Trigger Zone it gives off an error:

 

Error position: Type Array, expected Object,Location

 

Doesn't the _tesla getpos already make a location for the ModuleLightning to hit or am I missing something completely obvious?

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

×