Jump to content
Sign in to follow this  
SGJackson

Need help with a command!

Recommended Posts

Hallo all!

I'm making my own Artillery but i need help with a command:

Everything works fine, but i need to know how to place the shot wherever i want! this is what i did: onMapSingleClick "Bomb = 'SH_120_HE' createvehicle position player; true;", that works just fine! but when i tried this: onMapSingleClick "Bomb = 'SH_120_HE' createvehicle position [x,y,z]; true;" it didn't work!?:confused::confused::confused:

I mean, what's the needed command for making the shot where i click?!:eek:

Best Regards, SGJackson!:yay:

Share this post


Link to post
Share on other sites

Apparently the onMapSingleClick has it's own defined variables.

* _pos: Array - Clicked position

* _units: Array - Units which were selected (via function keys) before opening the map (may be non-functional in Arma)

* _shift, _alt Boolean - Whether <Shift> or <Alt> were pressed when clicking on the map

(sorry copy pasting from the wiki)

so

onMapSingleClick "Bomb = 'SH_120_HE' createvehicle _pos; true;"

Should work.

Share this post


Link to post
Share on other sites

hm, it worked for me, I just tried it.

However it seems that sometimes the game engine thinks you clicked so hard on the map so you got under the ground, and the bomb wouldn't spawn.

You can alter the hight of the spawned bomb by doing

onMapSingleClick "_newPos = [_pos select 0,_pos select 1,20];Bomb = 'SH_120_HE' createvehicle _newPos;hint format ['%1',_newPos]; true;"

this will also hint the pos for debugging.

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  

×