Jump to content

zeeb

Member
  • Content Count

    13
  • Joined

  • Last visited

  • Medals

Community Reputation

1 Neutral

1 Follower

About zeeb

  • Rank
    Private First Class

Recent Profile Visitors

The recent visitors block is disabled and is not being shown to other users.

  1. Thank you George, I'm actually planning on learning Event Handlers today so that BIKI link will come in handy. Appreciate your help! 🙂
  2. Thank you man, I appreciate you helping out, I'll check it out! 🙂 Anyway, it's more or less solved, I'll post the working script in the first post. I thank all of you, you've helped me out a lot and I learned a lot in the process! Keep doing what you're doing. ❤️
  3. I tried this script: params ["_veh"]; _gun = currentWeapon _veh; _vehNeedAssist = false; null = [] spawn { while {true} do { waitUntil { sleep 1; (getPosATL _veh # 2) < 10; (speed _veh) == 0; true }; _vehNeedAssist = true; }; }; while {_vehNeedAssist} do { hint "Stay parked for 10 seconds to fix your jet"; sleep 10; _veh setDamage 0; _veh setFuel 1; _veh setVehicleAmmo 1; hint "Your jet has been fixed"; _vehNeedAssist = false; }; But now I get Undefined variable in expression: _veh. I've been looking at the BIKI, at other threads etc for solutions and nothing is working, tried with/without brackets, spawn, <insert more stuff here>. Not gonna lie, after being at it for over 8 hours, without having it working as intended, is taking its toll on my psyche. About to smash my F'ing keyboard and throw this mission into the trashcan then light it on fire.. 🤬
  4. Appreciate the assist. I already do have that line of code, however I haven't found out yet how to only implement it when vehicle is controlled by the AI and not the player. However, I guess I'll put that last on the list since the rearm/repair/refuel function for the players is of higher priority, been at it for some time now haha.
  5. Thanks for your input, switched out the while{true} statement. 🙂 Do you know how I can call this globally on all player controlled vehicles? Because when everything works as it should I'll have to tackle adding infinite ammo to AI controlled vehicles. Which may turn bothersome since AI and players share the same vehicles, depending on how many players are playing the mission. But I don't know, it might be really easy. Like: if (isPlayer) then { // Land, go stationary for 10 seconds, rearm/refuel/repair. } else { // Get infinite ammo }; More or less what I'm going for.
  6. Tried to make a global ammo check script, but it didn't work. Don't know why it wont, but I'm so tired right now that I have no energy left to read anymore biki. Been at this script for a few hours now and the batteries are empty. If you have any inputs on why it wont work the script is below (tried to remove the vehicle init to make it affect all player driven vehicles present in the mission): _veh = (vehicle player); _gun = currentWeapon _veh; _vehNoAmmo = false; while {true} do { if ((_veh ammo _gun) == 0) then { _vehNoAmmo = true; }; }; while {_vehNoAmmo} do { hint "Your jet will be rearmed in 10 seconds."; sleep 10; _veh setVehicleAmmo 1; hint "Your jet has been rearmed!"; _vehNoAmmo = false; }; This is in the Init.sqf: // Jet Rearm execVM "scripts\jetRearm.sqf";
  7. Ah, thank you. Just confused me since it's while() in C++. 😜 Anyway, I managed to fix it. Now I just have to find out how to globally find the turret on each plane. (Which is why I tried primaryWeapon, really hoped it would work 😕) I don't want it to trigger just because you lack some flares, rather only when turret ammo is 0. Back to reading!
  8. Thanks Grumpy! By the way guys, how come this one is not working? while {(_veh ammo primaryWeapon) == 0} do { //stuff here }; It gives me Generic error in expression. And what is up with the while{}, shouldnt it be while()?
  9. Thank you for the explanations, I had to actually check the difference on the underscore and without, turns out I had them backwards. I didn't actually know that select 0 and #0 was the same, will use the latter going forward. This explains the #2 that Grumpy added. Thanks, I'll try it out and it's totally OK if it doesn't work as intended (Which it doesn't by the way haha), just means I got some learning to do. 🙂
  10. I didn't get any errors, but the script didn't execute correctly. 😕 Why use params ["_veh"]; instead of _veh = this select 0;? Indeed, I want the jet to repair, rearm and refuel when it's on the ground and parked after a set amount of time. I'm making a 5v5 jet fighter mission with sector control without missiles, so I want the players to be able to rearm after landing instead of using infinite ammo since the cannon on the jets has very limited ammo. Thanks for taking your time!
  11. Hey, I've seen you around this forum a lot helping people out, I appreciate you stopping by. I've fixed that issue, but as usual another one pops up.. This time it says Type Script, expected Object This is the updated code: _veh = this; if ((getPosATL _veh) < 10) && ((speed _veh) == 0) then { hint "Stay parked for 10 seconds to fix your jet."; sleep 10; _veh setDamage 0; _veh setFuel 1; _veh setAmmo 1; hint "Your jet has been fixed, you are ready for takeoff!"; }; If I use this select 0, I get met with a Type Script, expected Array,String,Config entry
  12. UPDATED: Script is now working as intended, a little personal tweaks and it should be good to go for extensive use. I will update the script if anyone comes up with better solutions/performance fixes. (just post them in this thread) Thank you guys for the assist! Script: jetFixer.sqf _veh = vehicle player; while {true} do { waitUntil { sleep 1; getPosATL _veh # 2 < 10 && speed _veh == 0 }; hint "Your jet will be fixed in 10 seconds"; _veh setFuel 0; sleep 10; _veh setDamage 0; _veh setFuel 1; _veh setVehicleAmmo 1; hint "Your jet has been fixed (Cooldown 30 seconds)"; sleep 30; }; Init.sqf: // Jet Fixer this = [] execVM "scripts\jetFixer.sqf"; _No Longer Relevant_ Anyone know what I'm doing wrong? Because I get the Missing ; error. Besides, I don't think this script will work, but you never know. (I used the biki to find the info) 😅
  13. Hey guys, this will be my first post on this forum. I've recently starting to go deeper into the editor and that involves scripting. I have set the MP mission to respawn on selected area with the player given the ability to choose loadout. The problem is that I can't define in the loadouts where the items should go, so on some loadouts not all items are included, or put into inventories I dont want them to be. (First Aid Kit's in the vest instead of uniform etc) Maybe someone here knows how I can fix it, heres my script: Loadout.cpp class CfgRoles { class Assault { displayName = $STR_A3_Role_Assault; icon = "a3\Ui_f\data\GUI\Cfg\RespawnRoles\assault_ca.paa"; }; class Support { displayName = $STR_A3_Role_Support; icon = "a3\Ui_f\data\GUI\Cfg\RespawnRoles\support_ca.paa"; }; class Recon { displayName = $STR_A3_Role_Recon; icon = "a3\Ui_f\data\GUI\Cfg\RespawnRoles\recon_ca.paa"; }; }; class CfgRespawnInventory { class WEST1 { displayName = "Rifleman"; // Name visible in the menu icon = "\A3\Ui_f\data\GUI\Cfg\Ranks\private_gs.paa"; // Icon displayed next to the name (private, corporal, sergeant, lieutenant, captain, major, colonel, general) role = "Assault"; // Loadout definition, uses same entries as CfgVehicles classes weapons[] = { "arifle_MX_F", "hgun_P07_F", "Binocular" }; magazines[] = { "16Rnd_9x21_Mag", "16Rnd_9x21_Mag", "16Rnd_9x21_Mag", "16Rnd_9x21_Mag", "16Rnd_9x21_Mag", "30Rnd_65x39_caseless_mag", "30Rnd_65x39_caseless_mag", "30Rnd_65x39_caseless_mag", "30Rnd_65x39_caseless_mag", "30Rnd_65x39_caseless_mag", "30Rnd_65x39_caseless_mag", "30Rnd_65x39_caseless_mag_Tracer", "30Rnd_65x39_caseless_mag_Tracer", "30Rnd_65x39_caseless_mag_Tracer", "30Rnd_65x39_caseless_mag_Tracer", "30Rnd_65x39_caseless_mag_Tracer", "MiniGrenade", "MiniGrenade", "MiniGrenade", "MiniGrenade", "SmokeShell", "SmokeShell", "SmokeShell", "SmokeShell" }; items[] = { "FirstAidKit", "FirstAidKit" }; linkedItems[] = { "V_PlateCarrier2_rgr", "H_HelmetSpecB", "G_Combat", "optic_Holosight", "acc_pointer_IR", "ItemMap", "ItemCompass", "ItemWatch", "ItemRadio", "ItemGPS", "NVGoggles" }; uniformClass = "U_B_CombatUniform_mcam"; //backpack = ""; }; class WEST2 { displayName = "Medic"; // Name visible in the menu icon = "\A3\Ui_f\data\GUI\Cfg\Ranks\private_gs.paa"; // Icon displayed next to the name (private, corporal, sergeant, lieutenant, captain, major, colonel, general) role = "Support"; // Loadout definition, uses same entries as CfgVehicles classes weapons[] = { "arifle_MXC_F", "hgun_P07_F", "Binocular" }; magazines[] = { "16Rnd_9x21_Mag", "16Rnd_9x21_Mag", "16Rnd_9x21_Mag", "16Rnd_9x21_Mag", "16Rnd_9x21_Mag", "30Rnd_65x39_caseless_mag", "30Rnd_65x39_caseless_mag", "30Rnd_65x39_caseless_mag", "30Rnd_65x39_caseless_mag", "30Rnd_65x39_caseless_mag", "30Rnd_65x39_caseless_mag", "30Rnd_65x39_caseless_mag_Tracer", "30Rnd_65x39_caseless_mag_Tracer", "30Rnd_65x39_caseless_mag_Tracer", "30Rnd_65x39_caseless_mag_Tracer", "30Rnd_65x39_caseless_mag_Tracer", "MiniGrenade", "MiniGrenade", "SmokeShell", "SmokeShell", "SmokeShell", "SmokeShell", "SmokeShell", "SmokeShell", "SmokeShell" }; items[] = { "FirstAidKit", "FirstAidKit", "FirstAidKit", "FirstAidKit", "FirstAidKit", "FirstAidKit", "FirstAidKit", "FirstAidKit", "FirstAidKit", "FirstAidKit", "FirstAidKit", "FirstAidKit", "Medikit" }; linkedItems[] = { "V_PlateCarrier1_rgr", "H_HelmetB", "G_Bandanna_khk", "acc_pointer_IR", "ItemMap", "ItemCompass", "ItemWatch", "ItemRadio", "ItemGPS", "NVGoggles" }; uniformClass = "U_B_CombatUniform_mcam_tshirt"; backpack = "B_AssaultPack_rgr"; }; class WEST3 { displayName = "LMG"; // Name visible in the menu icon = "\A3\Ui_f\data\GUI\Cfg\Ranks\corporal_gs.paa"; // Icon displayed next to the name (private, corporal, sergeant, lieutenant, captain, major, colonel, general) role = "Assault"; // Loadout definition, uses same entries as CfgVehicles classes weapons[] = { "arifle_MX_SW_F", "hgun_P07_F", "Binocular" }; magazines[] = { "16Rnd_9x21_Mag", "16Rnd_9x21_Mag", "16Rnd_9x21_Mag", "16Rnd_9x21_Mag", "16Rnd_9x21_Mag", "100Rnd_65x39_caseless_mag", "100Rnd_65x39_caseless_mag", "100Rnd_65x39_caseless_mag", "100Rnd_65x39_caseless_mag_Tracer", "100Rnd_65x39_caseless_mag_Tracer", "MiniGrenade", "MiniGrenade", "MiniGrenade", "MiniGrenade", "SmokeShell", "SmokeShell", "SmokeShell", "SmokeShell" }; items[] = { "FirstAidKit", "FirstAidKit" }; linkedItems[] = { "V_PlateCarrier2_rgr", "H_HelmetSpecB", "G_Combat", "optic_Holosight", "acc_pointer_IR", "ItemMap", "ItemCompass", "ItemWatch", "ItemRadio", "ItemGPS", "NVGoggles" }; uniformClass = "U_B_CombatUniform_mcam"; //backpack = ""; }; }; WEST3 does not work while the others do (I also have WEST4 that doesn't work but I didn't feel the need to include it) It put the items randomly, First Aid Kits in the Vest while excluding magazines since it tries to add them to the uniform when there is not enough space. Is there a way for me to use this function while also having the ability to choose where I want the items to be put? Instead of having the game trying to put the objects in place. (I like it organized so I usually go Medics + Secondary Ammo in Uniform and Grenades + Primary Ammo in the Vest) Thank you for your time, Zeeb.
×