A-SUICIDAL
-
Content Count
520 -
Joined
-
Last visited
-
Medals
Posts posted by A-SUICIDAL
-
-
The last part is what adds the current task and the indicator:
["Task1","Task1Title","Task1Desc.",true,[],"assigned", H1]
H1 is an invisible H helipad I have placed in my mission.
---------- Post added at 12:45 AM ---------- Previous post was Yesterday at 11:56 PM ----------
What if I wanted to add an ellipse shape marker [500,500] in size, like a large AO. Will this be possible?
-
Yeah, I've been reading through every page of the Taskmaster thread - and just found out how to do it for 3 selector target markers...
[["Marker1",getpos H1],["Marker2",getpos H2],["Marker3",getpos H3]]
But I think for the Large AO ellipse marker I need to place it in the mission and show/hide it using alpha stuff.
---------- Post added at 03:52 PM ---------- Previous post was at 03:27 PM ----------
I already had markers set up in the mission that I thought were jip compatible, but in testing last night a friend joined late just after task 1 started and he couldn't see the markers at all, but he could see the task location. I really wanted to keep the markers I had, and I thought they were jip compatible, but apparently they are not. And trying to get the markers to work with taskmasters might not be possible.
My task1 consists of 1 large AO marker and 3 small target markers marking where 3 objects are that need to be destroyed with C4. As each of the targets are destroyed, the target marker turns from red to green, and when all 3 targets are destroyed the large AO marker turns green and all completed green markers remain in the mission to the end.
This is in my init.sqf to get task 1 rolling:
["Task 1","Objective 1","Destroy all enemy targets marked in the AO using satchel charges.",true,[],"assigned", H1]
and this is part of the server_tasks.sqf file covering task 1:
waitUntil {(isDedicated) || !(isNull player)}; // Execute stuff with global effect only on the server // createMarker, createVehicle do have global effects if (!isServer) exitWith {}; // Launch task 1 A1 = createMarker ["AO1", position H1]; "AO1" setMarkerShape "ellipse"; "AO1" setMarkerType "empty"; "AO1" setMarkerSize [500, 500]; "AO1" setMarkerColor "ColorRedAlpha"; targ_M1a = createMarker ["targM1a", position H1a]; "targM1a" setMarkerShape "ICON"; "targM1a" setMarkerType "selector_selectedEnemy"; "targM1a" setMarkerSize [0.5, 0.5]; "targM1a" setMarkerColor "ColorRed"; targ_M1b = createMarker ["targM1b", position H1b]; "targM1b" setMarkerShape "ICON"; "targM1b" setMarkerType "selector_selectedEnemy"; "targM1b" setMarkerSize [0.5, 0.5]; "targM1b" setMarkerColor "ColorRed"; targ_M1c = createMarker ["targM1c", position H1c]; "targM1c" setMarkerShape "ICON"; "targM1c" setMarkerType "selector_selectedEnemy"; "targM1c" setMarkerSize [0.5, 0.5]; "targM1c" setMarkerColor "ColorRed"; targ1a = "TK_WarfareBAircraftFactory_Base_EP1" createVehicle [0,0,0]; targ1a setpos position H1a; targ1a setDir direction H1a; targ1a setVehicleInit "null = [this] execVM 'scripts\c4only.sqf';"; processInitCommands; targ1b = "TK_WarfareBUAVterminal_Base_EP1" createVehicle [0,0,0]; targ1b setpos position H1b; targ1b setDir direction H1b; targ1b setVehicleInit "null = [this] execVM 'scripts\c4only.sqf';"; processInitCommands; targ1c = "TK_WarfareBArtilleryRadar_Base_EP1" createVehicle [0,0,0]; targ1c setpos position H1c; targ1c setDir direction H1a; targ1c setVehicleInit "null = [this] execVM 'scripts\c4only.sqf';"; processInitCommands; // Broadcast to clients, so they know the task is running Task1Started = true; publicVariable "Task1Started"; _trg1=createTrigger["EmptyDetector", getPos H1c]; _trg1 setTriggerArea[1200,1200,0,false]; _trg1 setTriggerActivation["WEST","PRESENT",false]; _trg1 setTriggerStatements["this", "catch_trigger = 'trigger1'; publicVariable 'catch_trigger';", ""]; _trg1a=createTrigger["EmptyDetector", getPos H1c]; _trg1a setTriggerArea[150,150,0,false]; _trg1a setTriggerActivation["WEST","PRESENT",false]; _trg1a setTriggerStatements["this && {((getPosATL _x) select 2) < 5} count thislist > 0", "catch_trigger = 'trigger1A'; publicVariable 'catch_trigger';", ""]; _trg1b=createTrigger["EmptyDetector", getPos H1c]; _trg1b setTriggerArea[80,80,0,false]; _trg1b setTriggerActivation["WEST","PRESENT",false]; _trg1b setTriggerStatements["this && {((getPosATL _x) select 2) < 5} count thislist > 0", "catch_trigger = 'trigger1B'; publicVariable 'catch_trigger';", ""]; _targT1a=createTrigger["EmptyDetector",getPos player]; _targT1a setTriggerActivation["NONE","PRESENT",false]; _targT1a setTriggerStatements["!alive targ1a", "'targM1a' setMarkerColor 'ColorGreen';", ""]; _targT1b=createTrigger["EmptyDetector",getPos player]; _targT1b setTriggerActivation["NONE","PRESENT",false]; _targT1b setTriggerStatements["!alive targ1b", "'targM1b' setMarkerColor 'ColorGreen';", ""]; _targT1c=createTrigger["EmptyDetector",getPos player]; _targT1c setTriggerActivation["NONE","PRESENT",false]; _targT1c setTriggerStatements["!alive targ1c", "'targM1c' setMarkerColor 'ColorGreen';", ""]; missilestart setPos [getPos missileStart1 select 0, getPos missileStart1 select 1, 2000]; // Task1 finished condition waitUntil {!alive targ1a and !alive targ1b and !alive targ1c}; taskTarg1 setDamage 1; // Update markers, again, server side only, setMarkerColor is global "AO1" setMarkerColor "colorGreenAlpha"; MT1 = createMarker ["MarkerT1", getMarkerPos "T1"]; "MarkerT1" setMarkerShape "ICON"; "MarkerT1" setMarkerType "flag1"; "MarkerT1" setMarkerSize [0.5, 0.5]; "MarkerT1" setMarkerColor "ColorYellow"; "MarkerT1" setMarkerText " Teleport"; FlagT1 = "FlagPole_EP1" createVehicle [0,0,0]; FlagT1 setFlagTexture "pictures\yellowFlag.paa"; FlagT1 setPos (getMarkerPos "T1"); SphereT1 = "Sign_sphere25cm_EP1" createVehicle [0,0,0]; SphereT1 setPos (getMarkerPos "T1"); FlagT1 setpos [(getpos FlagT1) select 0, (getpos FlagT1) select 1, -0.1]; SphereT1 setpos [(getPos SphereT1) select 0, (getPos SphereT1) select 1, +0.04]; FlagT1 setVehicleInit "this allowDamage false; this addaction ['Teleport to Base', 'teleport\teleport_base.sqf'];"; SphereT1 setVehicleInit "this allowDamage false"; processInitCommands; // Broadcast to clients, so they update Task1Solved = true; publicVariable "Task1Solved";
---------- Post added at 04:11 PM ---------- Previous post was at 03:52 PM ----------
I also created triggers in the script that use murk_spawn.sqf to spawn enemy, but I'm guessing that all those triggers that get created will not appear for jip players. Same goes for the missilestart location that uses a call missile script that is available for 2 snipers of the 14 players in the mission.
I have an ammo crate hidden 2 meters under the ground far away in the corner of the map called task1Targ. I use the ammo crate and a "!alive" check as my task completed condition. I do this for each of my tasks. So if all 3 targets are destroyed for task 1, it will then "taskTarg1 setDamage 1;" to the ammo crate and the task is then completed. I do this because when I test the mission, I can simply make a radio trigger for each of my tasks that sets the damage to each crate to 1 to complete each of the tasks. Plus, all of my target objects are created throughout the mission, so I thought it would be smart to have all of the taskTarg1, taskTarg2, taskTarg3 etc ammo crates placed in the mission from mission start.
---------- Post added at 04:32 PM ---------- Previous post was at 04:11 PM ----------
I feel like a big pain in this forums ass when I come here posting all this stuff and asking for help. I'd devoted a lot of time trying to learn how to make a good mission that I can host from my pc and play with friends and allow public players to join and have everything run smoothly for jip players. If I could take a class and learn this scripting faster I would. Now I have a mission design completed and it plays great except for the jip problems that I'm killing myself to get fixed. If I had the money I would offer to pm the mission to somebody and pay them to fix my mission for me, then study everything they fixed, then use the mission as a guide when I make future missions.
I'm slowly getting the mission to the point where it is jip compatible. The task stuff is working, but the created markers and triggers are my new problem.
-
In taskmasters it says...
0.32 Added: Now it's possible to define multiple markers for a task.
I haven't found any examples of this. I'm trying to create a red ellipse marker 1000x1000 with 3 selector markers inside it at 0.5x0.5. I have 4 invisible H pads in the mission at the position where I want the 4 markers to appear, but I do not know exactly how to add 4 markers for a task. I know how to do it with 1 marker like I explained above when I used...
["Task1","Destroy Weapons Cache","Find and destroy the weapons cache.",true,["Marker1",getpos H1],"assigned", H1]
but i don't know how to do it with 4 markers or set their size. Does anybody know how to do this?
---------- Post added at 02:25 PM ---------- Previous post was at 01:37 PM ----------
This is all the info I can find on it...
Marker - array - Marker related to the task.
It will be created only for the units who have the task. Marker will be hidden after task is completed. Can be an array of marker arrays, if you want to create multiple markers.
-
Well, I got it working, but then I found out that taskmaster doesn't work if AI are disabled and you abort to lobby and pick another player slot and rejoin the battle. You will lose all of the tasks. In fact, if you test taskmasters sample mission online and disable the AI, you immediately get an error regarding group b "gb". In my mission, players can deploy static weapons, for instance the US machine gunner can deploy and M2 every 10 minutes, the BAF AT soldier can deploy a static TOW launcher every 10 minutes, and etc. So players are constantly aborting to lobby to change to a different player role and then they rejoin the battle - and using taskmaster will not work for them at all when they reconnect, unless I have AI enable at all times, which I absolutely do not want AI on my team in my missions ever since they are completely useless and retarded. So I guess no matter what, I just can't seem to make any of this work - unless this only happens to the host, I don't know yet. I haven't tested with friends yet to find out. But I am assuming that this will happen to everybody. I wish I could understand this stuff better.
So what I've been able to gather so far is... players that join late will be updated with all tasks, but if with AI are disabled and the late joining player then aborts to lobby and chooses a different player role/slot and rejoins the battle, he then loses all tasks.
Is there any possible way to update all tasks for a player that switches to a different player slot in lobby and rejoins the battle?
-
"assigned" didn't give me the little yellow waypoint arrow, but it shows the box shaded in grey as if it is set as the current task, so it didn't make sense to me why it didn't give my the waypoint thingy. I did have a marker location when I tested it, but no waypoint.
One part I am confused about is the "condition". I wasn't sure what to put there, so I tried "west" and got an error. It says...
Condition boolean/side/faction/unit/group/string Units the task is added to. Default is everyone
so what do I put there? In one of his samples it says...
["TaskName","Title","Description",Condition,[Marker],"State"]
so what do I replace the word "Condition" with?
Also, I assume I need to add at least 1 task to the init.sqf in order to activate the "shk_taskmaster.sqf" file. At the end of his init.sqf it says:
call compile preprocessfilelinenumbers "shk_taskmaster.sqf";
and I have no idea what "compile preprocessfilelinenumbers" is, but I guess I don't need to know as long as it's working. I had my mission setup so the first task gets created a few moments after the mission starts, but I have no problem with changing it so the first task is started immediately from the init.sqf.
The last thing I wanted to know is... to add this to my own mission, I just need the 1 "shk_taskmaster.sqf" file right? Or do I need all of those other files? I have no idea what those other files are for.
init_localize.sqf
shk_taskmaster_012.sqf
shk_taskmaster_020.sqf
shk_taskmaster_021.sqf
shk_taskmaster_022.sqf
shk_taskmaster_024.sqf
shk_taskmaster_025.sqf
shk_taskmaster_27.sqf
shk_taskmaster_28.sqf
shk_taskmaster_29.sqf
stringtable.xml
My guess was that they were older versions of the same script, and the xml is there to support other languages. The "init_localize.sqf" file has me stumped. Again, do I need these files?
He also mentioned something about multiple markers, but I'm not sure how to do that. Like if I wanted 2 markers for 1 task, I wouldn't know how to do that.
---------- Post added at 05:12 AM ---------- Previous post was at 04:35 AM ----------
I added the destination on the very end and it gave me the in-game waypoint. I didn't read that far before I guess. So Lets say I have an invisible H landing pad called "H1" that I want to use as my location
["Task1","Destroy Weapons Cache","Find and destroy the weapons cache.",true,["Marker1",getpos H1],"assigned", H1],
-
I started out in this thread explaining that I had tried to use Taskmaster, but I couldn't understand any of it. The example mission has no markers in it at all. I'm sure it's a great instructional reference for advanced scripters, but I really had a tough time with it. I still have the example mission, I also have like 10 other sample missions where I tried to use it and all attempts failed. But, I will take your advice and keep at it and see if I can somehow figure it out and get it to work in my mission. In his example mission, there are a bunch of shk_taskmaster_##.sqf files that seem to be unused, I don't know what they are for or if they are being used in some way. I also downloaded the updated shk_taskmaster.sqf file and put it in his example mission folder overwriting the older one.
Shuko helped me a long time ago with a double trigger method of updating jips, but that was for a mission where I had all of my 8 tasks showing on the map at mission start, and his method worked great, but then 1 day it stopped working out of nowhere, and I don't know why. My guess was that some new patch might have caused it to stop working. But even if it still were to work, I don't think it would work for the mission I am working on now, because my tasks are created throughout the mission instead of all being shown at mission start.
This is the page where he posted a link to his double trigger example mission:
http://forums.bistudio.com/showthread.php?t=106494&page=2
There is also another example mission by deadfast here:
http://forums.bistudio.com/showthread.php?t=105918&highlight=multitask
I'll first try what muzzleflash suggested and if I can't get that working, I'll get back to trying to figure out the taskmaster stuff.
Thanks again.
---------- Post added at 02:50 AM ---------- Previous post was at 01:17 AM ----------
I was just poking at taskmasters some more, and it kind of makes more sense to me now. I even managed to get a task to work, woohoo, lol.
["Task 2","Destroy Radar Tower","Destroy Radar Tower",true,["marker2",getmarkerpos "T2","mil_dot","ColorRed","Destroy Radar Tower"],"assigned"] call SHK_Taskmaster_add;
But Taskmasters method of adding markers is limited to 1 marker per task, so I can't put a big red AO Ellipse covering the area and size it. But then I thought... since the only thing in my mission that seems to be working great for JIPs is my "created" markers objects that need to be destroyed, I figured I could just keep all that stuff and simply add the very basic taskmaster "task" functionality to my mission.
Like for task 1 I could just use...
["Task1","Title","Desc"] call SHK_Taskmaster_add;
And to set it as succeeded and start task 2 use...
["Task1","succeeded",["Task2","Title","Desc"]] call SHK_Taskmaster_upd;
Something like that, I'll get it figured out. This could be fun actually - and easy. I think the reason why I had so much trouble understanding it before was because there were so many examples and so many radio triggers. This time I just ignored all that stuff and did what you said and just read through it more carefully, then I removed everything in his example init.sqf and started adding my own stuff, and it worked. Very cool. I wish there was a way to to add to the array - player setCurrentTask someTask, so it would give the little yellow waypoint arrow. And I also didn't have the option "set as current task". I hope there is a way to get that working.
-
I'm still not able to see tasks when I reconnect. I'm doing something wrong but I can't quite figure out what. Anyway, here's my sample mission so far. It has a mix of both of your suggestions. I appreciate the tremendous help you have given me so far.
-
My friend had the same problem - stuck in a mod detection - restart launcher - loop.
On teamviewer I deleted this folder on his computer:
C:\Users\User\AppData\Roaming\ArmA II Launcher
...and the problem went away.
-
Ok, trying it now. Thanks.
-
At the start of my mission, there is one task currently active and visible on the map. Once that task is completed, a new task appears on the map along with markers etc, kind of like in domi when an AO is completed and a few moments goes by and then a new AO appears on the map.
Will your method work for that? Or is what you explained above designed to work if all tasks are shown on map at mission start?
-
After applying it to my mission, I finally had the chance to test it with friends yesterday. The tasks still wouldn't appear for JIP players. I then tested your sample mission online and the same thing happened. I completed task1 and task2 started and then a friend joined and he had no tasks at all. I'm starting to understand how this stuff works a bit better, but I'm still unsure of a few things. I've been busy, so I'm just now getting back to work on it.
-
Yeah, I knew the tasks were being created for each player, but wasn't sure how to fix it. I have another example mission where it doesn't do that, but it still never worked for JIP. I'm going to apply your tasks example to the mission I am working on and then test with friends and hopefully it will finally be working correctly. The mission has 8 objectives and an extract at the end, so it's a little bit of work. 5:20 am and I'm dead tired, yet I just want to work on it now, lol, but I guess it would be smarter to get some sleep now and be bright eyed later when I work on it. Thanks so much for your help. I come back and let you know how it worked out.
-
Need JIP Help
How many times has this been asked?
I created a simple 3 task example mission:
I don't know how to make this sample mission JIP compatible. I made this sample mission just so I could post it here and ask for JIP help. It's actually pretty cool how I have my tasks scripted. The example mission contains 3 objectives, each one is an object that needs to be destroyed. The first object is created at the location of an invisible H landing pad along with its markers etc. When the first object is destroyed, the markers turn from red to green, some other stuff happens representing the task is completed, then a new task is created along with a new object and markers at the location of second invisible H landing pad. Then when the second task is completed, a third task, object and markers are created at a third invisible H landing pad - and when the third object is destroyed the mission completes. There is an option to radio Alpha, Bravo and Charlie to destroy each task object. If somebody can figure out how to make the example mission JIP compatible, I could then fix several missions that I've made in the past and also finally finish the mission that I am working on now. And it would be a great tutorial mission for other guys like me that have trouble understanding how to make their missions JIP compatible.
If somebody could please take a look at the mission and add the correct variables and call functions where needed to make it JIP compatible, it would be greatly appreciated. I know this is asking a lot, but I don't know what else to do at this point. I've tried using Taskmaster and other methods of adding JIP to my mission and I simply could not understand the example missions or the instructions. I've had other people tell me that they could not understand how to do it either.
Thanks in advance and props to anybody that can fix it.
-
Hmm, I tried, I couldn't get the engineOff action to work. Locking the vehicle when deploying with a simple "Vehicle locked while camo is deployed" hint should work fine. But what about players that are still in cargo? Eject them? lol. Or what about an MHQ type of vehicle that players can teleport into the cargo of from base, well, they shouldn't be able to switch to driver seat anyway, so that should'nt be a problem.
---------- Post added at 10:35 PM ---------- Previous post was at 10:31 PM ----------
Yeah, forget the hint, your right, the common sense should kick in, or pff for them, right. If they don't have enough common sense, then maybe they need to stop smoking so much pot, lol.
---------- Post added at 10:53 PM ---------- Previous post was at 10:35 PM ----------
I told AI to get in as pilot, then I deployed the camo, then I switched to the AI and I could not get out, but I could fly away - and once I was more than 12 meters away it collapsed and deleted the camo. So how do I eject the players inside when deploying the camo?
---------- Post added at 11:30 PM ---------- Previous post was at 10:53 PM ----------
I'm starting to understand why they take the fuel away in domi.
---------- Post added at 11:50 PM ---------- Previous post was at 11:30 PM ----------
So this is what I added to it so I could use it for both the air and land vehicles:
vehicle init:
this setVariable ["CamoDeployed", false, true]; this addAction ["Deploy Camo Cover", "mhq\camo_chopper.sqf", ["Deploy"], 51, false, true, "", "!(_target getVariable 'CamoDeployed')"]; this addAction ["Stow Camo Cover", "mhq\camo_chopper.sqf", ["Stow"], 50, false, true, "", "(_target getVariable 'CamoDeployed')"];
camo.sqf:
// No dedicated if (isDedicated) exitWith {}; _veh = _this select 0; _man = _this select 1; // What to execute _option = (_this select 3) select 0; // Exec only at caller //if (_man != player) exitWith {}; // Deploy if (_option == "Deploy") exitWith { // Exit if in vehicle if (vehicle _man != player) then { hint "You must dissembark before you can perform this action."; } else { if (isEngineOn _veh) then { hint "You must turn engine off before you can perform this action."; } else { _veh setFuel 0; _man playMove "AinvPknlMstpSlayWrflDnon_medic"; sleep 5; _Net = "Land_CamoNetB_EAST_EP1" createVehicle [0,0,0]; _Net setDir ((direction _veh) +0); _Net setPos (_veh modelToWorld [0,0,((position _veh) select 2)-2.4]); // Set variable for vehicle _veh setVariable ["CamoDeployed", true, true]; // String ;) sleep 1; waitUntil {!(_veh getVariable "CamoDeployed") || !(alive _veh) || !(alive _Net)}; // If stowed, no clean up needed, exit if (!(_veh getVariable "CamoDeployed")) exitWith {}; _veh setVariable ["CamoDeployed", false, true]; _veh setFuel 1; _Net setDamage 1; sleep 3; deleteVehicle _Net; if (!(_veh getVariable "CamoDeployed")) exitWith {}; _veh setVariable ["CamoDeployed", false, true]; _Net setDamage 1; sleep 3; deleteVehicle _Net; }; }; }; // Stow if (_option == "Stow") exitWith { // Exit if in vehicle if (vehicle _man != player) then { hint "You must dissembark before you can perform this action."; } else { _veh setFuel 1; // Remove nearest tent _Net = nearestObject [_veh, "Land_CamoNetB_EAST_EP1"]; _Net setDamage 1; _man playMove "AinvPknlMstpSlayWrflDnon_medic"; sleep 5; deleteVehicle _Net; // Set variable for vehicle _veh setVariable ["CamoDeployed", false, true]; }; };
---------- Post added at 12:16 AM ---------- Previous post was Yesterday at 11:50 PM ----------
oops, forgot to add back fuel if camo is destroyed. edit - updated script
-
I was thinking lock too, but some players might think it's permanently locked and not know that they need to stow before they can get in. So I figured.. let them in, but kill their engine and give them a hint that they need to stow before starting their engine. Is it possible to stop an engine that they try to start? In domi I think they remove the fuel until the mhq camo is stowed, but I thought the kill engine with a hint might make more sense if possible.
-
Works great. I deleted my "string" trigger, heh.
If applied to chopper, it should probably only be available if engine is off. So I through in an "engine off" check...
chopper_camo.sqf:
// No dedicated if (isDedicated) exitWith {}; _veh = _this select 0; _man = _this select 1; // What to execute _option = (_this select 3) select 0; // Exec only at caller if (_man != player) exitWith {}; // Deploy if (_option == "Deploy") exitWith { // Exit if in vehicle if (vehicle _man != player) then { hint "You must dissembark before you can perform this action."; } else { if (isEngineOn _veh) then { hint "You must turn engine off before you can perform this action."; } else { _man playMove "AinvPknlMstpSlayWrflDnon_medic"; sleep 5; _Net = "Land_CamoNetB_EAST_EP1" createVehicle [0,0,0]; _Net setDir ((direction _veh) +0); _Net setPos (_veh modelToWorld [0,0,((position _veh) select 2)-2.4]); // Set variable for vehicle _veh setVariable ["CamoDeployed", true, true]; // String ;) sleep 1; waitUntil {!(_veh getVariable "CamoDeployed") || (_veh distance _Net > 12) || !(alive _veh) || !(alive _Net)}; // If stowed, no clean up needed, exit if (!(_veh getVariable "CamoDeployed")) exitWith {}; _veh setVariable ["CamoDeployed", false, true]; _Net setDamage 1; sleep 3; deleteVehicle _Net; }; }; }; // Stow if (_option == "Stow") exitWith { // Exit if in vehicle if (vehicle _man != player) then { hint "You must dissembark before you can perform this action."; } else { // Remove nearest tent _Net = nearestObject [_veh, "Land_CamoNetB_EAST_EP1"]; _Net setDamage 1; _man playMove "AinvPknlMstpSlayWrflDnon_medic"; sleep 5; deleteVehicle _Net; // Set variable for vehicle _veh setVariable ["CamoDeployed", false, true]; }; };
But it wouldn't make sense if a player were to take off and fly away while the camo is still covering the chopper, so maybe lock the chopper until the camo is either stowed or destroyed? Maybe I'm getting in over my head here. But I was thinking if engine on, maybe kill the engine and hint that player must stow the camo before being allowed to turn engine on.
-
oh, I changed the the icon from "dot" to "mil_start" and set the size to 0.5 and also added a setMarkerDir of the player. Now it shows the players direction on the map, which is actually kind of helpful at times.
waitUntil {!isNull player}; if (_this != player) exitWith {}; if (!isPlayer _this) exitWith {}; _mName = format["player_%1_marker",_this]; _pName = format["%1",(name player)]; if (isNil (_mName)) then { _marker = createMarker[_mName,[0,0]]; _mName setMarkerShape "ICON"; _mName setMarkerSize [0.5, 0.5]; _mName setMarkerColor "ColorBlue"; _mName setMarkerType "mil_start"; _mName setMarkerText _pName; while {!isNull player} do { _mName setMarkerPos (getPos player); _mName setMarkerDir (direction player); sleep 1; if (!alive player) then { _mName setMarkerAlpha 0; waitUntil {alive player}; _mName setMarkerAlpha 1; }; }; deleteMarker _mName; _mName = nil; };
-
I added what you said and it took away the ability to stow the camo if I drive more >5 meters away.
So, since in the small coop mission I am working on right now only has 1 transport vehicle/truck that I want to add a deploy camo option to - I decided to add a trigger... specific for the vehicle, in this case my vehicle is a called "truck1".
condition:
(!alive vehCamo) OR (!alive truck1) OR (truck1 distance vehCamo >12)
activation:
null = [] execVM "delete_camo.sqf";
and in the delete_camo.sqf:
vehCamo setDamage 1; sleep 3; deleteVehicle vehCamo; truck1 setVehicleInit "this setVariable ['CamoDeployed', false, true];"; processInitCommands;
If camo is damaged/collapsed - it deletes the camo and give the vehicle the option to deploy again.
If vehicle is destroyed - it deletes the camo and give the vehicle option to deploy again - which doesn't matter since the vehicle deletes and respawns anyway - and then adds back the camo action.
But basically what the triggers main purpose is... if you drive away from the tent and get more that 12 meters away from it, it collapses the tent and then deletes it and gives the vehicle back the option to deploy it again. Kind of like - as if there is a string tied from the net to the truck and driving away yanks the tent to the ground, lol. I know, it seems weird, but it it seems even more weird to me for the vehicle to have an option to stow a camo net that is miles away from the vehicle - and then after stowing it - having to go back into another animation just to get it deployed again. I am assuming that if I wanted to use more than 1 vehicle that has camo abilities and want to use this string yank approach - that I would then need to create camo.sqf files specific to each vehicle that I want to have a camo option. Like camo1.sqf for truck1 and camo2.sqf for truck2. Unless there is a way to implement my trigger system into the script and have it work for all vehicle using just 1 camo.sqf file. I don't mind creating multiple camo script files for each vehicle that I want to have a camo abilities.
-
Really awesome man. I feel like it's my birthday. The comments, the colors, and it tested perfectly. And I learned a few things that I can definitely put to use in other scripts. I asked for a little help and wow. Just wow.
Thanks man. Really. Thank you so much.
-
I wrote a script for deploying/stowing a camo cover for a vehicle. Option to deploy appears when near the vehicle, after deploying the camo cover and option to stow appears. It works fine offline. If I deploy it, I can then switch player and stow it. But when I deploy it online, other players cannot stow it, instead they still see the option to deploy it, and when they do, there are then 2 camo covers overlapping. So I need help. It's a good script for any mission creator, if I only I can get it to work correctly online.
init.sqf:
camoStowed = true; camoDeployed = false;
vehicle init:
this addAction ["Deploy Camo Cover","camo_deploy.sqf",nil,1,true,true,"","alive _target and camoStowed and player distance _target<7"]; this addAction ["Stow Camo Cover","camo_stow.sqf",nil,1,true,true,"","alive _target and camoDeployed and player distance _target<15"];
camo_deploy.sqf:
_veh = _this select 0; _man = _this select 1; if ( vehicle _man != _man ) then { hint "You must dissembark before you can perform this action."; } else { vehCamo = objNull; _man playMove "AinvPknlMstpSlayWrflDnon_medic"; sleep 5; vehCamo = "Land_CamoNetB_EAST_EP1" createVehicle [0,0,0]; vehCamo setDir ((direction _veh) +0); vehCamo setPos (_veh modelToWorld [0,0,((position _veh) select 2)-2.4]); camoDeployed = true; publicVariable "camoDeployed"; camoStowed = false; publicVariable "camoStowed"; vehCamo setVehicleInit "this setVehicleVarName 'vehCamo'"; processInitCommands; if (true) exitWith {}; };
camo_stow.sqf;
_veh = _this select 0; _man = _this select 1; if ( vehicle _man != _man ) then { hint "You must dissembark before you can perform this action."; } else { vehCamo setDamage 1; _man playMove "AinvPknlMstpSlayWrflDnon_medic"; sleep 5; deleteVehicle vehCamo; camoDeployed = false; publicVariable "camoDeployed"; camoStowed = true; publicVariable "camoStowed"; if (true) exitWith {}; };
Honestly, I am not really sure what the hell I am scripting, like with variables and stuff. I managed to get it to work offline, so Yay sui!!!, but I'm still very much a newb at this stuff. I tried using "if (isServer) then {" but I'm not sure I implemented it correctly, so I took it out when I still couldn't get it to work online, but I figured it needs to be in there someplace. Anyway, I'm sure I am going about this completely wrong, so if anybody could please help me with this, it would be greatly appreciated. I'm sure others might want to use it as well. Here's my Takistan demo mission if you want to try it, but it won't work online.
-
The trigger was set to repeatedly. I tried what you said and it still won't work for me. I hosted a non dedicated server, once I was in the game, I hit escape and went back to lobby and chose a different player slot and then rejoined the mission and the trigger will not activate "if" I am already standing in it. It will activate if the trigger is next to me and I step into the radius, but I can't have it setup that way because how do I know what direction some other player is going to head in - and I need it to activate right away.
I do appreciate the help.
I can't even get another trigger to detect that I've even rejoined the mission using "alive player" as a condition check and an On Act hint.
-
I'm trying to find a way to get a script to execute for jip players. The script is safe for all players currently in the game, so it can be activated from a trigger if necessary. I've tried using a blufor trigger placed covering the respawn area with the condition "this" then I went to the lobby and chose a different player slot and then rejoined the mission, but the trigger did not activate. If I moved the trigger a few feet away, and then rejoined the mission, the trigger would activate once I stepped into the trigger radius, but I cannot get it to activate if the player enters the mission already standing inside the trigger. So I figured I would ask for help with this. Again, the script doesn't have to be executed from a trigger, but I don't know of another way to do it.
-
Is there any possible way of running anti-cheat on a non-dedicated server? I'm so sick of hackers joining my game every time I host a small coop mission. The other day I banned over 8 hackers within a 2 hour period of time. Most of them spawn tons of bombs, others spawn themselves an Abrams, 1 guys turned me into a 50 foot giant and I was stuck in gay animation and had to restart the mission. Another guy spawned a battleship of some kind in the mountains. I wish they would just f#ck off and die. I'm starting to hate this game because of it.
-
I've had the same problem. AI think for themselves, I never found a way to turn off their fear, lol.
---------- Post added at 02:49 PM ---------- Previous post was at 02:45 PM ----------
cowardPilot setskill ["Courage",0.95];
Deploy-Stow Vehicle Camo problem
in ARMA 2 & OA : MISSIONS - Editing & Scripting
Posted
I deploy the camo, then a player JIPs and gets the deploy action instead of stow. Anyway to fix that?