Jump to content

TheSkyStarKnight

Member
  • Content Count

    4
  • Joined

  • Last visited

  • Medals

Everything posted by TheSkyStarKnight

  1. TheSkyStarKnight

    Creating an Array of units not in a trigger zone.

    Thankyou! I never even thought of using these simple methods with Arrays. It works perfectly.
  2. So, I'm officially stuck. I've been looking everywhere, but I can't seem to find out how to create an array based on units that are NOT in a triggerzone. I discovered that it is fairly simple to collect an (_x array) of units inside of a trigger, however once I use this command: _List = list trigger; It gives me an empty array of units since nobody is in the trigger, even though the trigger is set to "ANY", "NOT PRESENT". Any ideas?
  3. TheSkyStarKnight

    Ammo Refill Scripting Issue

    I appreciate it! Hopefully in the future I can find more efficiency in my work.
  4. Hello everyone! Recently, whilst developing a map, I've run into some issues. I've worked now for several hours on this same set of scripts attempting to make them work, and looking at other scripts for reference, but to no avail. I've come to ask for help. Essentially, I have precisely eight weapons in a mission that I am creating, and I want to make a sign with an addAction that allows the player to buy ammo for him / her and all other players currently in-game. My original plan was to create one large script, however this did not work well, so I divided it into nine different scripts. I know, I know, those of you who are very good at scripting will be very annoyed by this, but that's where the learning comes in, right? (Yes, by the way, I AM using mods, so some of the configs are modded). Script 1 - called when the addAction is activated. { { if (money < 500) exitWith {hint "Sorry, your team does not have enough money for that!"}; }; else { {execVM "ammorefill1.sqf", execVM "ammorefill2.sqf", execVM "ammorefill.sqf", execVM "ammorefill4.sqf", execVM "ammorefill5.sqf", execVM "ammorefill6.sqf", execVM "ammorefill7.sqf", execVM "ammorefill8.sqf"}; sleep 1; {hint "Eligable for a restock! Restock Bought."}; sleep 3; {hint format ["A Team Member has spent $500 dollars on an ammo refill, and your team now has $%1 dollars left!", TL_killCount]}; }; }; Those eight scripts that are called are here, listed as follows: { if (player1 hasWeapon "SMG_02_F") then {allPlayers addMagazines ["30Rnd_9x21_Mag_SMG_02", 5], _cost = 2}; }; { if (player1 hasWeapon "arifle_AKS_F") then {allPlayers addMagazines ["30Rnd_545x39_Mag_F", 5], _cost = 2}; }; { if (player1 hasWeapon "rhs_weap_m4") then {allPlayers addMagazines ["30Rnd_556x45_Stanag", 5], _cost = 2}; }; { if (player1 hasWeapon "SMA_ACRMOE") then {allPlayers addMagazines ["30Rnd_556x45_Stanag", 5], _cost = 2}; }; { if (player1 hasWeapon "rhs_weap_sr25_d") then {allPlayers addMagazines ["20Rnd_762x51_Mag", 5], _cost = 2}; }; { if (player1 hasWeapon "rhs_weap_M590_8RD") then {allPlayers addMagazines ["rhsusf_8Rnd_00Buck", 5], _cost = 2}; }; { if (player1 hasWeapon "LMG_Zafir_F") then {allPlayers addMagazines ["150Rnd_762x54_Box", 5], _cost = 2}; }; { if (player1 hasWeapon "rhs_weap_m24sws_ghillie") then {allPlayers addMagazines ["30Rnd_9x21_Mag_SMG_02", 10], _cost = 2}; }; Each of those lines is in a different script. The eight scripts, however, are not the problem yet. The first script will not go through as it states that it is missing a Semicolon. If anyone could help me with this problem I would really appreciate it. Thanks for your time, ~Nic
×