Hi all
Ive been woring on a script that uses onmapsingleclick to make ai vehicles shoot where i click........It works great and ive made different several different versions that are executed with a radio command, preset targets, addaction and a script with a timer to holdfire until turret falls on its target where you onmapsingleclick.
im not satisfied...."and a script with a timer to holdfire until turret falls on its target where you onmapsingleclick" <-------- Iwant to change that......
----------------------------------------------------------------------------------------------
#loop1
onMapSingleClick { "target1" setmarkerpos _pos; tar1 setpos [getmarkerpos "target1" select 0, getmarkerpos "target1" select 1,.2]; t1 doWatch getPos tar1}
? Getdir
??:goto "boom"
~.01
goto "loop1"
;----------------
#boom
t1 fire ["gun120","heat120"]
~.5
goto "loop1"
---------------------------------------------------------------------------------------
Heres the new one im working on. As you can see, i want to use GETDIR and have the vehicle hold its fire until the barrel comes to rest where you clicked onmap. Now, ive been here awhile...i know you guys dont like repeat questions....so i did massive research with search options... i came up with posts about using getdir to keep things in front of other things, getdir to create things with the same dir as leader and some others that might have helped but went unanswered and unsolved after awhile.
I found out about functions and dirtoobj.sqf, however due to my lack of experience in these ways, i am unable to figure out how to use dirtoobj.sqf as or in a condition..the timer version i made had a 4 secocond delay to allow the turret to get into position.......id like to use a getdir argument where you see "
??" that would hold fire until turret was ready. im not interested in distance or hieght.....only that targeting is complete before shots are let go"ie.. facing my mapclicktarget which is a logic"...........
can i GETDIR for my vehicle with a GETPOS on the target?
after a week and a half,2-3 hours a day, i cant search anymore so i come before you, the wise ones and ask that you complete this tiny link in the code for me :'( or at least show me what i need to put in there to make dirtoobj.sqf work with it.........i know how to call the sqf file and looked it over and everything, i just dont know how to work it into a condition.
I really appreciate any help you may give...Thanks