hard5c0p3k1ng 11 Posted January 11, 2017 How could I drop a bomb where my cursor is at (coordinates), with or without people being nearby? Share this post Link to post Share on other sites
ACoolDuck 1 Posted January 11, 2017 You can use the command onMapSingleClick command to use your cursor position example : openMap true; onMapSingleClick "'HandGrenade' createVehicle _pos; openMap false; true"; this should open your map then wait for you to click then closes the map and spawns a grenade on the position. Share this post Link to post Share on other sites
hard5c0p3k1ng 11 Posted January 11, 2017 6 hours ago, ACoolDuck said: You can use the command onMapSingleClick command to use your cursor position example : openMap true; onMapSingleClick "'HandGrenade' createVehicle _pos; openMap false; true"; this should open your map then wait for you to click then closes the map and spawns a grenade on the position. I have a feeling it is not possible but doing the same without using the map. Share this post Link to post Share on other sites
ACoolDuck 1 Posted January 11, 2017 (edited) use cursortarget for position if you want to use where you are looking at. So 'HandGrenade' createVehicle cursorTarget; Edited January 11, 2017 by ACoolDuck adding code example Share this post Link to post Share on other sites
killzone_kid 1331 Posted January 11, 2017 2 minutes ago, ACoolDuck said: use cursortarget for position if you want to use where you are looking at. So 'HandGrenade' createVehicle cursorTarget; Would you please stop posting nonsense? Guaranteed you are new, so please make sure you test your suggestions before you give them. Thank you. Share this post Link to post Share on other sites
ACoolDuck 1 Posted January 11, 2017 (edited) 27 minutes ago, killzone_kid said: Would you please stop posting nonsense? Guaranteed you are new, so please make sure you test your suggestions before you give them. Thank you. Yes sorry about that. Tested. cursorTarget sometimes allows me to create an object there and sometimes doesn't. Probably not a good idea to use this method although at the moment it's the only one i can think of. Although the cursortarget one is not reliable this is the fixed version of the map method: openMap true; onMapSingleClick "'GrenadeHand' createVehicle _pos; openMap false; true"; Edited January 11, 2017 by ACoolDuck adding fix for map Share this post Link to post Share on other sites
killzone_kid 1331 Posted January 11, 2017 NVM edited Share this post Link to post Share on other sites
ACoolDuck 1 Posted January 11, 2017 Just now, killzone_kid said: No, you haven't tested anything. You know how I know that? Because there is no vehicle class HandGrenade therefore you cannot create vehicle with this name. So once again I ask you nicely, please stop posting nonsense. You are not helping anyone by posting broken code, you only make it difficult for anyone to find what they are looking for. I corrected it to GrenadeHand.... Share this post Link to post Share on other sites
theend3r 83 Posted January 11, 2017 34 minutes ago, ACoolDuck said: Yes sorry about that. Tested. cursorTarget sometimes allows me to create an object there and sometimes doesn't. Because using cursorTarget is a bad approach since there's no object under your cursor most of the time. The correct command is screenToWorld [0.5,0.5]. Sorry, I know you're trying to help but k_k is kinda right about this. Share this post Link to post Share on other sites
ACoolDuck 1 Posted January 11, 2017 Just now, theend3r said: Because using cursorTarget is a bad approach since there's no object under your cursor most of the time. The correct command is screenToWorld [0.5,0.5]. Nice job! Share this post Link to post Share on other sites
Beerkan 71 Posted January 12, 2017 Since when was "GrenadeHand" a bomb. B.T.W, no need to re-invent the wheel. Simples... BangaBob Simple Mortar Script Share this post Link to post Share on other sites
hard5c0p3k1ng 11 Posted January 13, 2017 6 hours ago, Beerkan said: Since when was "GrenadeHand" a bomb. B.T.W, no need to re-invent the wheel. Simples... BangaBob Simple Mortar Script GG Share this post Link to post Share on other sites