clydefrog
Member-
Content Count
706 -
Joined
-
Last visited
-
Medals
Everything posted by clydefrog
-
person taking item only triggers task complete for that person
clydefrog posted a topic in ARMA 2 & OA : MISSIONS - Editing & Scripting
Hi, I'm having a problem I've tried to fix several times and I can't. I have 2 objectives in my mission where you need to "take" an item using the action menu, which then triggers a task complete message. The problem is the task hints only show up and set the tasks as complete for the person who takes the items and not everybody else. The first of these tasks consists of an object named "C130" with the following in its init: _takebox = C130 addaction ["Retrieve Flight Recorder","intel.sqf"]; this is the intel.sqf that it links to: C130 = true; PublicVariable "C130"; task3 setTaskState "SUCCEEDED"; C130 removeAction _takebox; ; exit (C130 in this script is the task name) then I have a trigger with condition: taskCompleted task3 // onAct: null = [task3,task4] execVM "complete.sqf"; this is the content of the complete.sqf: /// How to use /// Called with 2 Params, param 1 is the completed objective, param 2 is the new objective. /// null = [task1,task2] execVM "complete.sqf"; _taskcomplete = _this select 0; _tasknext = _this select 1; _taskcomplete settaskstate "SUCCEEDED"; [_taskcomplete] call mk_fTaskHint; sleep 4; player setcurrenttask _tasknext; [_tasknext] call mk_fTaskHint; I have also tried having the onAct field as just "player setCurrentTask task 4" as I'm aware that I have already stated task 3 as completed when the script executes but this makes no difference and is not part of the problem. The second task is more basic; I have a map on the ground named "evi1" and in the trigger above that completes task3 I also have the following evi1 addaction ["pick up intel", "collect.sqf"]; which adds the action to pick up intel to the map only after task 3 is completed, this is the collect.sqf file: deletevehicle evi1; task4 setTaskState "SUCCEEDED"; which just deletes the map when the script is executed by clicking "pick up intel" on the action menu, and then sets the task as complete. I have a trigger condition: taskCompleted task4 // onAct: C130J=true; publicVariable "C130J"; null = [task4,task5] execVM "complete.sqf"; (C130J is the name for task4 in my briefing) Again I have also tried having the onAct field as just "player setCurrentTask task 5" and [task5] call mk_fTaskHint; as I have already stated task 3 as completed when the script executes but again this makes no difference and is not part of the problem. Does anybody have any idea how to fix this? It all works fine when I try it myself but if somebody else does the task it only completes and sets the next one for them and nobody else. Is there another way of doing it that can get around the problem? Thanks. -
person taking item only triggers task complete for that person
clydefrog replied to clydefrog's topic in ARMA 2 & OA : MISSIONS - Editing & Scripting
Hmm, I haven't registered a tag on OFPEC as obviously I didn't even know what that thing did, but can I just call it whatever I want? e.g. CFROG? -
person taking item only triggers task complete for that person
clydefrog replied to clydefrog's topic in ARMA 2 & OA : MISSIONS - Editing & Scripting
Haha yeah I suppose apart from that setVariable TAG_ stuff that I don't even understand what it does, and you layed it out properly for me. -
person taking item only triggers task complete for that person
clydefrog replied to clydefrog's topic in ARMA 2 & OA : MISSIONS - Editing & Scripting
Ok so I've done it right then, I did test that task before with somebody else and it did work so hopefully it's all fine. So you haven't used that CBA globalexecute thing before then? I take it you're just that good at this stuff that you don't need to be familiar with stuff to know how to use it properly? heh -
person taking item only triggers task complete for that person
clydefrog replied to clydefrog's topic in ARMA 2 & OA : MISSIONS - Editing & Scripting
Sorry, which bit of my post is this referring to? -
LHD (Aircraft Carrier) spawning script
clydefrog replied to armatech's topic in ARMA 2 & OA : MISSIONS - Editing & Scripting
lol, that's a good point, if everything that could possibly be going wrong isn't going wrong, it probably isn't ArmA. -
LHD (Aircraft Carrier) spawning script
clydefrog replied to armatech's topic in ARMA 2 & OA : MISSIONS - Editing & Scripting
Tested my mission now a few times with a few people with your version of the LHD script in my init.sqf, seems to work great, everybody spawns on the carrier and nothing weird has happened, thanks. -
person taking item only triggers task complete for that person
clydefrog replied to clydefrog's topic in ARMA 2 & OA : MISSIONS - Editing & Scripting
That works perfect, thanks so much Deadfast and Hellfire for helping me get this task working, it was *I hope* the only thing stopping my mission from working properly. So for the other more basic one, where I want to "pick up" a map off the floor, would it just be: evi1 addaction ["pick up intel", "collect.sqf"]; I take it that setvariable part in the other one is just for the TAG_takeaction part? and then in the collect.sqf: deletevehicle evi1; [-1, { task4 setTaskState "SUCCEEDED"; }] call CBA_fnc_globalExecute; as deletevehicle is already global so it should disappear for everybody anyways? Also should I only have the CBA globalexecute set to -1 for all clients and not -2 for all clients and the server? This mission will be played on a dedicated server. -
person taking item only triggers task complete for that person
clydefrog replied to clydefrog's topic in ARMA 2 & OA : MISSIONS - Editing & Scripting
I'll try this later today, thanks. -
person taking item only triggers task complete for that person
clydefrog replied to clydefrog's topic in ARMA 2 & OA : MISSIONS - Editing & Scripting
I see, well since it is the task completed part that I need to be broadcast globally to everybody on the server, and I also need to remove the action for everybody so it isn't still there when the task is done, should I add the call CBA_fnc_globalExecute to just those parts? e.g. C130 = true; PublicVariable "C130"; [-1, {task3 setTaskState "SUCCEEDED";}] call CBA_fnc_globalExecute; // set task as complete for everybody [-1, {C130 removeAction _takebox;}] call CBA_fnc_globalExecute; // remove action for everybody ; exit Should I add it to the C130=true as well? If I can't work this out I will send you it and you can take a look. At the moment since I can't get it working I have tried doing it a cheap way and on the map object that I had added a pick up action for I have just put a "deletevehicle map" trigger by it, so when you stand right over it it disappears and you get a message saying you've picked it up. I guess I won't get any weird problems doing it this way but it is better the way I want to do it with addAction menus. Same for the other task too really. Thanks. -
person taking item only triggers task complete for that person
clydefrog replied to clydefrog's topic in ARMA 2 & OA : MISSIONS - Editing & Scripting
I'm using CBA as I'm using ACE, so how would I go about using this thing on those tasks? Everybody can see the action in the menu btw, it's just that the task stuff triggered after it only shows up for the person who used the menu that executes them. I've put in the object named C130's init: [-2, {_takebox = C130 addaction ["Retrieve Flight Recorder","intel.sqf"];}] call CBA_fnc_globalExecute; Is that right? Ok, that didn't work, I tried adding it for both the addaction parts and the task stuff still doesn't show up for other players. -
Activating a trigger by using another trigger
clydefrog replied to Bioz's topic in ARMA 2 & OA : MISSIONS - Editing & Scripting
If you didn't put it in the trigger and did it the first way you said it, where would you put the array (arraytrig = [trig1,trig2,trig3])? -
H Barrier walkable
clydefrog replied to odyseus's topic in ARMA 2 & OA : MISSIONS - Editing & Scripting
If they're the large H barriers lay wooden pallets down on top of them so the sand of the hescos is slightly piled over them, works well and looks good too. -
Spawning enemy by distance
clydefrog replied to clydefrog's topic in ARMA 2 & OA : MISSIONS - Editing & Scripting
Ahh, thank you. I guess those are useless in this case as they are not set to move in a formation anyways, just stand there. -
LHD (Aircraft Carrier) spawning script
clydefrog replied to armatech's topic in ARMA 2 & OA : MISSIONS - Editing & Scripting
Hmmm, I've been running the script from it's own file and executing it from the init line of the invisible H, not from the init.sqf. This is what I have in the invisible H called LHD_Center as told to do from this thread: this setPosASL [getposASL this select 0, getposASL this select 1, 0]; res=[this]execVM"CreateLHD.sqf" So you just put that code at the top of your init.sqf and then you create the invisible H with nothing in the init? Well just tried taking that code out and adding yours to my init.sqf, changing a couple of values so it now reads // Spawn of the LHD Carrier if (isServer) then { _LHDspawnpoint = [getposasl LHD_Center select 0, getposasl LHD_Center select 1, 0]; { _dummy = createVehicle [_x, _LHDspawnpoint, [], 0, "NONE"]; _dummy setdir 270; _dummy setPos _LHDspawnpoint; } foreach ["Land_LHD_house_1","Land_LHD_house_2","Land_LHD_elev_R","Land_LHD_1","Land_LHD_2","Land_LHD_3","Land_LHD_4","Land_LHD_5","Land_LHD_6"]; }; Everything is there in the right place on the carrier etc so it seems fine so far, will have to test the mission again to see if it's fixed the duplicate lights problem. This is my previous script btw also from this thread: if (isServer) then { _LHDspawn = _this select 0; _LHDdir = 270; _LHDspawnpoint = [getposasl LHD_Center select 0, getposasl LHD_Center select 1, 0]; _parts = [ "Land_LHD_house_1", "Land_LHD_house_2", "Land_LHD_elev_R", "Land_LHD_1", "Land_LHD_2", "Land_LHD_3", "Land_LHD_4", "Land_LHD_5", "Land_LHD_6" ]; { _dummy = _x createvehicle _LHDspawnpoint; _dummy setdir _LHDdir; _dummy setpos _LHDspawnpoint; } foreach _parts; }; -
Spawning enemy by distance
clydefrog replied to clydefrog's topic in ARMA 2 & OA : MISSIONS - Editing & Scripting
It says "Special properties can be: "NONE" and "FORM". ", it doesn't say what "NONE" and "FORM" mean or do though. -
Spawning enemy by distance
clydefrog replied to clydefrog's topic in ARMA 2 & OA : MISSIONS - Editing & Scripting
Great thanks, what does the "NONE" and the [], 1, before it refer to? -
Domination 2 vehicle respawn and markers files
clydefrog posted a topic in ARMA 2 & OA : MISSIONS - Editing & Scripting
I'm making an edit of the newest domination and I've added a few more helicopters to the base. I'd like these helicopters to also have markers like the pre-placed ones and use the same vehicle respawn script. Which files do I need to edit to add these in? -
Domination 2 vehicle respawn and markers files
clydefrog replied to clydefrog's topic in ARMA 2 & OA : MISSIONS - Editing & Scripting
Haha, hi pero, thanks. -
this allowfleeing 0 It stops them running away if they are unarmed.
-
Counting players from a group for MP mission
clydefrog posted a topic in ARMA 2 & OA : MISSIONS - Editing & Scripting
I'm using the code {_x in thisList} count units alpha > 0 or {_x in thisList} count units bravo > 0; on a mission to count if there are is at least 1 player from either of 2 groups in the trigger area to trigger the task complete. This works fine when I try it by myself (preview in the editor) but when I host it it won't work, even with a player from both groups in the area it won't fire the trigger. I've been told it's the "_x" thing but can't remember what else the guy said about it. How do I make this code multiplayer compatible? Another problem I'm having in the same mission is a hint and a Task Accomplished message only coming up for the person who uses the action menu to "take" an object, and not for the rest of the team, any help with either of these problems would be greatly appreciated. I guess it's something to do with locality but I really don't have a good understanding of it at all yet. Thanks -
Counting players from a group for MP mission
clydefrog replied to clydefrog's topic in ARMA 2 & OA : MISSIONS - Editing & Scripting
Thought it would be but couldn't find it when I searched, thanks. I asked you a question in that post as well btw, don't know if you saw it or not. Would I do this: {_x in thisList} count units alpha == > 0 or {_x in thisList} count units bravo == > 0; and how would that differ from what I'm already using? -
Counting players from a group for MP mission
clydefrog replied to clydefrog's topic in ARMA 2 & OA : MISSIONS - Editing & Scripting
Well at the moment the trigger is just triggering a Task Accomplished message (using mktaskhint script) and also a hint saying "Welcome to etc. etc.". Deleting the other trigger when one of them is activated is a good idea, what's the code for that? -
Counting players from a group for MP mission
clydefrog replied to clydefrog's topic in ARMA 2 & OA : MISSIONS - Editing & Scripting
Ok, so how would I adjust my code to use that (if I need to)? Would it be: {_x in thisList} count units alpha == > 0 or {_x in thisList} count units bravo == > 0; ? Is the code I'm currently using not already saying that the number of units in alpha or bravo must be equal to more than 0 anyways? ------------------------------------------------------------------------------------------------------------- But if I do this, is it not going to trigger the same activation consequences twice when the two groups both walk into the triggers? Thanks -
Counting players from a group for MP mission
clydefrog replied to clydefrog's topic in ARMA 2 & OA : MISSIONS - Editing & Scripting
I'm not sure I really understand what that means ( {_x in veh} count units GroupName == count units GroupName ) I can see it's checking how many of a group are in a vehicle, is it checking to see if the whole group is in? On mine I want the trigger to go just if at least 1 group member is there, the whole group doesn't need to be. What is "=="? Does it just mean equals and is it a multiplayer specific thing? I seem to remember being told I should use that in some way by somebody. Nice site btw, looks helpful.