satory
Member-
Content Count
20 -
Joined
-
Last visited
-
Medals
Community Reputation
10 GoodAbout satory
-
Rank
Private First Class
-
I've had a look around on here and on Armaholic, but I cant seem to find out, How do you go about creating a campaign. Lets say I have 3 mission already created where do I go from there?
-
How do you make a script MPable?
satory replied to satory's topic in ARMA 2 & OA : MISSIONS - Editing & Scripting
so would a "sleep 1" command be better than something like this "waituntil (alive _this select 0)" encompassing the existing code? -
How do you make a script MPable?
satory replied to satory's topic in ARMA 2 & OA : MISSIONS - Editing & Scripting
how do you mean? Surely if I extract it as a multiplayer map, the script should be put in the pbo? I'll have a look at the rpt file in the morning and see if that shows any problems -
How do you make a script MPable?
satory replied to satory's topic in ARMA 2 & OA : MISSIONS - Editing & Scripting
I usually put the script file in the Twin_Towns.Utes folder. I only have 2 scripts running, this and the UPS one I found on armaholic? I'll add this now and try and upload it to a server. ---------- Post added at 08:14 PM ---------- Previous post was at 07:53 PM ---------- No it didn't seem to work, just tried it there and I start off with the default weapons. -
How do you make a script MPable?
satory posted a topic in ARMA 2 & OA : MISSIONS - Editing & Scripting
Hey everyone, I have a script which I made, with help from a previous thread on this board. But I have a problem with it its grand when I preview a mission, but once I upload the mission onto a server it doesn't work at all. The script is called on every playable characters init box like so, nul=[this] execVM "ChangeW.sqf" And the script itself is: _punit = _this select 0; _unittype=typeof _punit; removeAllWeapons _punit; _punit addWeapon "Binocular"; _punit addWeapon "NVGoggles"; switch (_unittype) do { case "USMC_Soldier_AT": { _punit addMagazine "30Rnd_556x45_StanagSD"; _punit addWeapon "M4A1_AIM_SD_camo"; _punit addMagazine "30Rnd_556x45_StanagSD"; _punit addMagazine "30Rnd_556x45_StanagSD"; _punit addMagazine "30Rnd_556x45_StanagSD"; _punit addMagazine "30Rnd_556x45_StanagSD"; _punit addMagazine "15Rnd_9x19_M9SD"; _punit addWeapon "M9SD"; _punit addMagazine "15Rnd_9x19_M9SD"; _punit addMagazine "15Rnd_9x19_M9SD"; _punit addMagazine "15Rnd_9x19_M9SD"; _punit addMagazine "15Rnd_9x19_M9SD"; _punit addMagazine "SMAW_HEAA"; _punit addWeapon "SMAW"; _punit addMagazine "SMAW_HEAA"; _punit addMagazine "SMAW_HEDP"; _punit addMagazine "HandGrenade"; _punit addMagazine "HandGrenade"; }; case "USMC_Soldier_SL": { _punit addMagazine "30Rnd_556x45_StanagSD"; _punit addWeapon "M4A1_AIM_SD_camo"; _punit addMagazine "30Rnd_556x45_StanagSD"; _punit addMagazine "30Rnd_556x45_StanagSD"; _punit addMagazine "30Rnd_556x45_StanagSD"; _punit addMagazine "30Rnd_556x45_StanagSD"; _punit addMagazine "30Rnd_556x45_StanagSD"; _punit addMagazine "30Rnd_556x45_StanagSD"; _punit addMagazine "15Rnd_9x19_M9SD"; _punit addWeapon "M9SD"; _punit addMagazine "15Rnd_9x19_M9SD"; _punit addMagazine "15Rnd_9x19_M9SD"; _punit addMagazine "15Rnd_9x19_M9SD"; _punit addMagazine "15Rnd_9x19_M9SD"; _punit addMagazine "SmokeShell"; _punit addMagazine "SmokeShell"; _punit addMagazine "SmokeShellGreen"; _punit addMagazine "SmokeShellRed"; }; case "FR_Sapper": { _punit addMagazine "30Rnd_556x45_StanagSD"; _punit addWeapon "M4A1_AIM_SD_camo"; _punit addMagazine "30Rnd_556x45_StanagSD"; _punit addMagazine "30Rnd_556x45_StanagSD"; _punit addMagazine "30Rnd_556x45_StanagSD"; _punit addMagazine "30Rnd_556x45_StanagSD"; _punit addMagazine "30Rnd_556x45_StanagSD"; _punit addMagazine "15Rnd_9x19_M9SD"; _punit addWeapon "M9SD"; _punit addMagazine "15Rnd_9x19_M9SD"; _punit addMagazine "15Rnd_9x19_M9SD"; _punit addMagazine "15Rnd_9x19_M9SD"; _punit addMagazine "15Rnd_9x19_M9SD"; _punit addMagazine "Pipebomb"; _punit addMagazine "Pipebomb"; _punit addMagazine "Pipebomb"; }; case "USMC_Soldier": { _punit addMagazine "30Rnd_556x45_StanagSD"; _punit addWeapon "M4A1_AIM_SD_camo"; _punit addMagazine "30Rnd_556x45_StanagSD"; _punit addMagazine "30Rnd_556x45_StanagSD"; _punit addMagazine "30Rnd_556x45_StanagSD"; _punit addMagazine "30Rnd_556x45_StanagSD"; _punit addMagazine "30Rnd_556x45_StanagSD"; _punit addMagazine "15Rnd_9x19_M9SD"; _punit addWeapon "M9SD"; _punit addMagazine "15Rnd_9x19_M9SD"; _punit addMagazine "15Rnd_9x19_M9SD"; _punit addMagazine "15Rnd_9x19_M9SD"; _punit addMagazine "15Rnd_9x19_M9SD"; _punit addMagazine "HandGrenade"; _punit addMagazine "HandGrenade"; }; default { _punit addMagazine "30Rnd_556x45_StanagSD"; _punit addWeapon "M4A1_AIM_SD_camo"; _punit addMagazine "30Rnd_556x45_StanagSD"; _punit addMagazine "30Rnd_556x45_StanagSD"; _punit addMagazine "30Rnd_556x45_StanagSD"; _punit addMagazine "30Rnd_556x45_StanagSD"; _punit addMagazine "30Rnd_556x45_StanagSD"; _punit addMagazine "15Rnd_9x19_M9SD"; _punit addWeapon "M9SD"; _punit addMagazine "15Rnd_9x19_M9SD"; _punit addMagazine "15Rnd_9x19_M9SD"; _punit addMagazine "15Rnd_9x19_M9SD"; _punit addMagazine "15Rnd_9x19_M9SD"; _punit addMagazine "HandGrenade"; _punit addMagazine "HandGrenade"; }; } What do I need to change to make it work for MP? -
Yeah cheers, I noticed that while I was testing this out. Lets just say I died a few times in working out where my ammo had gone, and if I had actually in fact added the correct sort of ammo :rolleyes:
-
Ok I'm going to assume that since there is no mention of my script in the RPT file its not actually being run? Here is my RPT file, If that is so the case, and the script is not being run can some one point me in the right direction? Here is the players init field: this moveincargo boat1; nul=[this] execVM "ChangeWeapon.sqf" note the playable unit starts off in a boat. And here is a copy of the script, its called ChangeWeapon.sqf _punit = _this select 0; _unittype=typeof _punit; removeAllWeapons _punit; switch (_unittype) do { case "USMC_Soldier_AT": { _punit addWeapon "M4A1_AIM_SD_camo"; _punit addMagazine "30Rnd_556x45_StanagSD"; _punit addMagazine "30Rnd_556x45_StanagSD"; _punit addMagazine "30Rnd_556x45_StanagSD"; _punit addMagazine "30Rnd_556x45_StanagSD"; }; case "USMC_Soldier_SL": { _punit addWeapon "M4A1_AIM_SD_camo"; _punit addMagazine "30Rnd_556x45_StanagSD"; _punit addMagazine "30Rnd_556x45_StanagSD"; _punit addMagazine "30Rnd_556x45_StanagSD"; _punit addMagazine "30Rnd_556x45_StanagSD"; }; case "FR_Sapper": { _punit addWeapon "M4A1_AIM_SD_camo"; _punit addMagazine "30Rnd_556x45_StanagSD"; _punit addMagazine "30Rnd_556x45_StanagSD"; _punit addMagazine "30Rnd_556x45_StanagSD"; _punit addMagazine "30Rnd_556x45_StanagSD"; }; case "USMC_Soldier": { _punit addWeapon "M4A1_AIM_SD_camo"; _punit addMagazine "30Rnd_556x45_StanagSD"; _punit addMagazine "30Rnd_556x45_StanagSD"; _punit addMagazine "30Rnd_556x45_StanagSD"; _punit addMagazine "30Rnd_556x45_StanagSD"; }; default { _punit addWeapon "M4A1_AIM_SD_camo"; _punit addMagazine "30Rnd_556x45_StanagSD"; _punit addMagazine "30Rnd_556x45_StanagSD"; _punit addMagazine "30Rnd_556x45_StanagSD"; _punit addMagazine "30Rnd_556x45_StanagSD"; }; } Oh, one question, do scripts have an 8.3 filename limit? ---------- Post added at 11:14 PM ---------- Previous post was at 11:06 PM ---------- :(:(:( I think this has solved my problem... Thanks all who helped!!!!
-
Yeah dropping the "" on the player classes in the switch statement didnt do anything. Just before I do anything else, this is the right code iin the units init? nul=[this] execVM "ChangeWeapon.sqf" With ChangeWeapon.sdf being the name of the script? and this being the first argument. ---------- Post added at 12:24 PM ---------- Previous post was at 10:25 AM ---------- Okay, typeof definitely works as I've used it to return a string to the screen. So somewhere along the line of my unit entering the script it falls apart, since it doesn't actually remove all weapons before entering the switch/case statement.
-
That didn't work :(
-
Cheers Ghost, I have that link up in one of my tabs all ready, what I'm looking for is the condition for the case statement? The code in the OP was just written quickly to try and give people an idea of what I'm looking to do. I'm at work at the moment so I don't have everything with me, but here is a more syntax proper example _pUnit = _this select 0; removeAllWeapons _pUnit; switch (CONDITION?) do { case "USMC_Soldier_AA" : { _pUnit addWeapon "M4A1_AIM_SD_camo"; _pUnit addMagazine "30Rnd_556x45_StanagSD"; }; case "USMC_Soldier_Medic" : { _pUnit addWeapon "M4A1_HWS_GL_SD_Camo"; _pUnit addMagazine "30Rnd_556x45_StanagSD"; }; };
-
First off I'm probably blind, and its been looking back at me all this time, but I cant see what Im looking for... My plan is to write a script that will change the teams weapons to silenced ones. I want to write a case statement that checks a players class/role on the team, so for example Switch(class/role) { "USMC_Soldier_AA": blah blah "USMC_Soldier_Medic": blah blah } I'd like to run the case statement against the names in this thread I have been using this page here and staring at it for ages but I cant see what I'm looking for, any suggestions?
-
Making enemy units appear on the map?
satory replied to satory's topic in ARMA 2 & OA : MISSIONS - Editing & Scripting
Thanks very much, I'll give it a go. -
Making enemy units appear on the map?
satory posted a topic in ARMA 2 & OA : MISSIONS - Editing & Scripting
This is probably a simple question, but I couldn't find what I was looking for so... One of the objectives in my map is a ambush a convoy, I'd like to make it that once this objective becomes the main one, basically after the trigger before it sets the convoy to move, I'd like the convoy to show on the map permenantly, until it reaches its destination. How would I go about doing this? -
How to check if a unit has not reached a destination and is dead
satory replied to satory's topic in ARMA 2 & OA : MISSIONS - Editing & Scripting
Yeah that makes sense, so if Jim is killed and not in the Trigger area then it would fire. this addEventHandler ["killed", "if (!(Jim in (list trigger1))) then {"1" objStatus "DONE"} else {"1" objStatus "FAILED"};"]; I've added in the objective status like I would of had in the trigger and Im getting an error, it says its mission a "]" Any ideas? -
How to check if a unit has not reached a destination and is dead
satory replied to satory's topic in ARMA 2 & OA : MISSIONS - Editing & Scripting
Yeah thats what I had at first, though the problem is that if the player kills "Jim" when he's at his destination then the trigger is activated. Im hoping to make sure that even if they kill "Jim" when he's at his destination then its too late and they wont complete the objective?