Furkan Aksakal 0 Posted July 3, 2022 Hi everyone, anyone know how can do infinite ammo for uav's, I tryed this script Quote uav addEventHandler ["fired",{(_this select 0) setvehicleammo 1}] but didn't worked on the any uav's, so anyone can help me? My mod list; https://prnt.sc/eflQWhwdEtem https://prnt.sc/-deVg_rMlDUc Share this post Link to post Share on other sites
Joe98 92 Posted July 3, 2022 this addeventhandler ["fired", {(_this select 0) setvehicleammo 1}] Try the word "this" at the front Share this post Link to post Share on other sites
Janez 531 Posted July 3, 2022 7 hours ago, Furkan Aksakal said: but didn't worked on the any uav's, so anyone can help me? If you inserted that into unit's initialization line then yes, you have to either use this as Joe pointed out, or you have to name the unit by inserting something into name field and use that instead of this. You could also insert something like below into init.sqf and have every unit of that type have unlimited ammo: if (typeOf _veh == "B_UAV_02_dynamicLoadout_F") then { _veh addEventHandler ["Fired", {(_this select 0) setVehicleAmmo 1}]; }; Scripting Commands Event Handlers Assets Share this post Link to post Share on other sites
Furkan Aksakal 0 Posted July 3, 2022 6 hours ago, Joe98 said: this addeventhandler ["fired", {(_this select 0) setvehicleammo 1}] Try the word "this" at the front Didn't worked. 2 hours ago, Janez said: If you inserted that into unit's initialization line then yes, you have to either use this as Joe pointed out, or you have to name the unit by inserting something into name field and use that instead of this. You could also insert something like below into init.sqf and have every unit of that type have unlimited ammo: if (typeOf _veh == "B_UAV_02_dynamicLoadout_F") then { _veh addEventHandler ["Fired", {(_this select 0) setVehicleAmmo 1}]; }; Scripting Commands Event Handlers Assets İ don't get it, this is so complicated for me, because ı'm simple and new player in arma 3. Share this post Link to post Share on other sites
Harzach 2517 Posted July 3, 2022 OK. How exactly did you use the code in your first post? Where did you put it? 1 Share this post Link to post Share on other sites
Furkan Aksakal 0 Posted July 3, 2022 32 minutes ago, Harzach said: OK. How exactly did you use the code in your first post? Where did you put it? Here; https://prnt.sc/PZBNs6g8e809 Share this post Link to post Share on other sites
pierremgi 4890 Posted July 3, 2022 12 minutes ago, Furkan Aksakal said: Here; https://prnt.sc/PZBNs6g8e809 Don't run that in debug console. This is a magic variable which refers to the object (usually),so write this code in init field of the UAV. 1 1 Share this post Link to post Share on other sites
Furkan Aksakal 0 Posted July 3, 2022 1 minute ago, pierremgi said: Don't run that in debug console. This is a magic variable which refers to the object (usually),so write this code in init field of the UAV. Can you explain for me how can i find uav init? I know ı'm asking a lot of question sorry :/ Share this post Link to post Share on other sites
Melody_Mike 130 Posted July 3, 2022 Hi @Furkan Aksakal, welcome to the forums :). 2 hours ago, Furkan Aksakal said: Can you explain for me how can i find uav init? I know ı'm asking a lot of question sorry :/ The BI Wiki (BIKI) gives a complete tutorial:https://community.bistudio.com/wiki/Category:Eden_Editor The "init" box is part of the object attributes, which is what you get when you double click on a unit.https://community.bistudio.com/wiki/Eden_Editor:_Entity_Attributes The different attributes are explained here:https://community.bistudio.com/wiki/Eden_Editor:_Object -> So you are looking to insert some code into the "init" part of your UAV's attributes. That is the box where you can enter expressions/program code. If you prefer watching videos, there are also a lot of tutorials on YouTube. Most of them are in English. If you have a very specific problem with something you are working on, and you cannot find the answer on search engine/forums, you can try posting here for help. There is also a Discord server. Happy editing! 2 Share this post Link to post Share on other sites
Joe98 92 Posted July 4, 2022 Learn to give one soldier unlimited ammo and then work from there. Share this post Link to post Share on other sites