Jump to content
Sign in to follow this  
Mirek

[CUSTOM MISSION] SECOPS ACE/TFAR Chernarus

Recommended Posts

Hi

Iam working on a mission for my small team of friends. And i need a lot of help with it.

First some introduction:

I run small (8strong) "comunity" of Arma 2 players. We play "Army of the Czech republic" with ACE (because arma without ACE is just not fun at all) and TFAR for radios. Also some JSRS and Blastcore for Eyecandy and earcandy.

Since iam working hard, i have not much time for arma, so creating missions for my team is problematic.

SO i decided that i will make one single mission that would be so rich in content, that we will be able to enjoy playing it over and over. Someone would point me towards DOMINATION or PATROL OPS, but thats not exactly what i need, as those missions are for big number of people, and i doesnt seem to be able to run host them on local computer, for whatever reason. (they are probably hardcoded to run on DEDICATED servers only whatever)

SO i have this mission i call it SECOPS_ACE/TFAR_ACR (i will change the name eventualy)

What is the mission about:

Mission consists basicaly of BIS stock SOM module edited according to some guides i found by google, ACM module edited according to some guides found on the internet, and some custom made crudely randomized missions that i created myself.

Everithing works, somehow, but i have some rather anoing issues there.

1. Custom Tasks are showing only for hosting player, or for group leader.

I have tasks created using createSimpleTask command for example:

tskcop = A1 createSimpleTask ["Interogate Informant\nVyslechnout informátora"];
tskcop setSimpleTaskDescription ["Someone called us, and told us that he might have an important piece of intel for us. He wants us to meet him. Go to the location marked by yellow marker,find the informant and interogate him. ", "Interogate Informant\nVyslechnout informátora", "Informant"];          
tskcop setTaskState "Assigned";                              
A1 setCurrentTask tskcop;                              
taskhint ["Interogate Informant\nVyslechněte informátora!", [1, 1, 1, 1], "taskCurrent"];  
Interogate = fizl addAction ["Interogate Informant","WIP.sqf"];

Task works fine for the Group leader whos name is A1 but nobody else in group sees it.

i tried it with player instead of A1, but then only hosting player saw it.

2. Custom actions added by adAction comand works only for Hosting player.

I have action called by

Interogate = fizl addAction ["Interogate Informant","WIP.sqf"];

Wich calls script WIP.sqf:

if (isServer) then {
tskcop setTaskState "Succeeded";   
taskhint ["Hi, i might have some info for you\nbut you dont have it from me!", [0, 1, 0, 1], "taskDone"]; 

tskwip = A1 createSimpleTask ["Arrest Insurgent"];   
tskwip setSimpleTaskDescription ["Informant gave us possible location, of Important member of the insurgent movement here in chernarus. Investigate the area, arrest the man, and take him to your base!", "Investigate", "information"]; 
tskwip setTaskState "Assigned";  
A1 setCurrentTask tskwip; 
taskhint ["I might overheard possition of someone important.", [1, 1, 1, 1], "taskCurrent"];

mwip = createMarker ["target", position WIP ]; 
"target" setMarkerShape "ELLIPSE";
"target" setMarkerBrush "DIAGGRID";
"target" setMarkerColor "ColorRed";
"target" setMarkerSize [1000, 1000];

fizl removeAction Interogate;

deleteMarker "Informant";
};

Problem is that only hosting player can use the action. other players see it on the policeman, but if they use it nothing happends i found this thread, but i have no idea what the guys are talking about

3. Custom missions randomisation is not what i originaly wanted.

So far i have 3 custom missions, one is to find and arrest a local varlord, the others are to find and destroy ammocashe and to find missing person.

first one is made that i have the warlord placed in editor,

i call him WIP,http://i.imgur.com/Ygjj3jL.jpg (157 kB)

he is sinchronised with few markers placed on different places on the map, so he appears on different possition each time we run the mission,http://i.imgur.com/i4W5CsA.jpg

he has probability of presence 52% so the mission will not be allways there.

and i have trigger size of chernarus, that will fire when WIP is present, that assignes the missionto the player and starts some script(see problem 1and problem 2)

second is practicaly the same but i have ammobox called bedna_kitu instead of opfor soldier

third is also the same but i have civilian woman called vnucka instead of soldier or ammobox placed in the editor.

SO they appear randomly, on random places, and they iniciate some tasks thats ok, but i also want the tasks to appear at random time, not on the start of the mission, and i want them appeared only if the other tasks ore not present, or are allready finished.

4. SOM and ACM module customisations are not entirely what i needed

SOM module:

I have placed som module and sinchronized it with group leader, then i putted this code

som setVariable ["TSS_vehicle_custom", transport];
som setVariable ["settings", [["ambush", "trap", "rescue", "patrol", "escort", "search"], true, ["Zub", ["Zub"], "Balota", ["Balota"]], 240, false,180,0.4,[1000, 5000]]];

into my init.sqf so i have only missions i need. it works fine, but i also need to change the units. SOM spawns russians, i want CHDKZ.

I also want to add my own little side missions to SOM, or alter the existing ones, and dont know how, but that i allready asked somewhere else so hope ill get my answer.

Last thing in SOM is real pain in the ass: I put this trigger http://i.imgur.com/EdRooIE.jpg and a chopper, to have my own on mapclick transport. It works sometimes, but most of the times the heli arives where i called it to, but then either just howers abowe, or it will land, but before we get into it, it will take of again, and will hower above and not respond to anything.

5. Some things i just dont know how to do.

Used MODS:

CBA_CO

ACE

ACEX

ACEX_USNavy

ACEX_RU

JSRS

JSRS_ACE

JSRS_ACR

Blastcore

SHACTAC - Bunnyhop

- Fire team HUD

- Map autobrightness

- Interact

TFAR_CO

Current version of the mission for download: http://uloz.to/xCw8h5kh/secops-ace-2ftfar-acr-chernarus-pbo

Edited by Mirek

Share this post


Link to post
Share on other sites
i found this thread, but i have no idea what the guys are talking about

It's an Arma3 thread, and the function called is for Arma3. Won't work for A2 or OA.

Task works fine for the Group leader whos name is A1 but nobody else in group sees it.

i tried it with player instead of A1, but then only hosting player saw it.

only hosting player can use the action.

tasks and addAction are both Local in effect, though they can use global arguments. Since effect is local:

a). Each client needs to have the script (not limited to server).

b). Each client needs an event handler attached to a public variable so that when the variable is broadcast the script will run on their machine.

https://community.bistudio.com/wiki/addPublicVariableEventHandler (can go in init.sqf or be run in mission by script or trigger)

c). The trigger or addaction needs to broadcast the public variable. When it's broadcast the eventhandler will fire on the client machines and run the script code.

d). The code being run needs a filter for the correct unit, team, faction or side, because every client will be running it.

i also want the tasks to appear at random time, not on the start of the mission, and i want them appeared only if the other tasks ore not present, or are allready finished.

You could have a public variable, like "isTeamOnMission" and use that to determine that another mission can be assigned when false.

You could have a script run code to select a random public variable from an array, and a trigger tied to each variable, to initiate that particular mission assignment when true. When the script broadcasts the selected variable as true, the trigger for that mission, detecting true, will initiate. When mission completed the variable gets reassigned false and the trigger runs deact code so it can be fired again.

i want CHDKZ.

I updated the SOM discussion.

http://forums.bistudio.com/showthread.php?73329-Secondary-Ops-Manager-Module-Discussion&p=2788974&viewfull=1#post2788974

Share this post


Link to post
Share on other sites

Hey man,

thanks for your effort, but i might happend to be a bit dumber than you expect.

a). Each client needs to have the script (not limited to server).

You mean that i should delete the

if (isServer) then{

thingy? What should i replace it with?

b). Each client needs an event handler attached to a public variable so that when the variable is broadcast the script will run on their machine.

https://community.bistudio.com/wiki/addPublicVariableEventHandler (can go in init.sqf or be run in mission by script or trigger)

Thats a bit to advanced coding for me :-( [secret](i cant code for shit, i can only copy bits of other peoples codes, and frankenstein them together to get what i need. I have no idea what variable, eventhandler, or string means.)[/secret]

c). The trigger or addaction needs to broadcast the public variable. When it's broadcast the eventhandler will fire on the client machines and run the script code.

How do i make triger to broadcast something?

d). The code being run needs a filter for the correct unit, team, faction or side, because every client will be running it.

How?

You could have a public variable, like "isTeamOnMission" and use that to determine that another mission can be assigned when false.

You could have a script run code to select a random public variable from an array, and a trigger tied to each variable, to initiate that particular mission assignment when true. When the script broadcasts the selected variable as true, the trigger for that mission, detecting true, will initiate. When mission completed the variable gets reassigned false and the trigger runs deact code so it can be fired again.

How do i do that?

Edited by Mirek

Share this post


Link to post
Share on other sites
i might happend to be a bit dumber than you expect.

Doubtful. I've seen some of your effort.:thumbsup:

Or we've all been there. You decide.

[secret](i cant code for shit, i can only copy bits of other peoples codes, and frankenstein them together to get what i need.)[/secret]

[secret](Ssshhh...:shhh: we all do that. But it's kept in "the vault.")[/secret]:padlock:

----------------------------------

You mean that i should delete the "if (isServer) then" thingy? What should i replace it with?

For a small group like yours, you probably shouldn't use "if isServer" at all for tasks or addAction where everyone needs them. Using isServer, it's only available to the host. If AI could accidentally trigger something, you should replace it with "if (isPlayer)". Otherwise leave it open.

But you still want to filter out other unwanted stuff. By filtering, I mean using the "if-then". If-then acts as a filter:

if ((isPlayer && heIsSideIwant && heKilledTheBadGuy) || IwantThisAnyway) then {call thisIsWhatIwantHappening};

- it only happens when the filtered results are true.

addPublicVariableEventHandler

Thats a bit to advanced coding for me :-(

addPublicVariableEventHandler is how a lot of communication is done in MP. Building an MP mission, you'll really need to understand it.

The function is pretty simple:

- An event handler gets attached to a "certain Variable".

- The variable has to be {global}, not {_local}, meaning no underline in front.

- The event handler is given to those who would broadcast or receive the variable. For a small group like yours, probably everyone. (host and clients)

- When a certain event is detected, the handler runs its code.

- The event detected is the "certain Variable" being broadcast using the PublicVariable command; i.e.:

	broadcast = [1,2,3];
publicVariable "broadcast";				//Variable "broadcast" has now been transmitted.

- the publicVariable can be broadcast by anyone. It will be received by everyone - EXCEPT the sender.

- When the broadcast is received, the receiver's event handler fires off its code.

- If the code is for assigning a task, the task is assigned; if it's for an addaction code to run, the code gets run.

- It only occurs for those who have the event handler - but not the sender.

- Note: The variable itself doesn't have to change value; it is the broadcast that triggers the code.

So when laying out the code for the tasks and addAction, lay it out for the client whose machine will be running it, but include broadcasting the public variable so others in the group have the code run on their machine as well. It won't be running again for the client who broadcast it.

command addPublicVariableEventHandler - the layout is:

- <the variable>

- <the command>

- <the code or script to be run, when the variable gets broadcast>

"my_Variable" addPublicVariableEventHandler {
hint "my_Variable was broadcast";
player sidechat "The event handler has been triggered.";
};

note: you can only test it in multiplayer, with a partner or a 2-PC LAN setup.

example for a task:

// whenever the variable tskobj2 is broadcast (changed or not), all clients except the sender will start running script "task3.sqf"

"tskobj2" addPublicVariableEventHandler {[] execVM "task3.sqf";};

// -or-
// whenever tskobj2 is broadcast, all clients except the sender will start running the code below

"tskobj2" addPublicVariableEventHandler 
{
//--- this is the filter: tskobj2 was broadcast as "true", player West, and badGuy dead.
if (tskobj2 && ((side player) == WEST) && !(alive badGuy)) then
{
	tskobj3 = player createSimpleTask["Search Camp"];
	tskobj3 setSimpleTaskDescription ["Search the enemy camp for documents.", "Search Camp", "Search"];
	tskobj3 setSimpleTaskDestination (getMarkerPos "InsurgentCamp");
	tskobj3 setTaskState "ASSIGNED";
	Player setCurrentTask tskobj3;
	"2" objStatus "DONE";
	Tskobj2 setTaskState "SUCCEEDED";
};
};

And in a trigger you put:

condition:	!alive badGuy;

-------

onAct.:		tskobj2 = true;
	publicVariable "tskobj2";

A small group like yours, you probably want everyone having the event handlers.

The init.sqf is received and run by everyone, so that could be a good place to put them.

Edited by OpusFmSPol

Share this post


Link to post
Share on other sites

Thank you very much, dear kind sir!

This is now more understandable for me.

Your effort is very apreciated.

Share this post


Link to post
Share on other sites

OK just Not sure how to handle it.

SO If i want the script to run on all clients i will da an eventhandler as you described. so if i have for example a trigger.

That is triggered by presence of an enemy, And in on act. window i have folowing code,

tskbox = A1 createSimpleTask ["Search for Insurgent ammo supplies.\nVypátrejte povstalecké zásoby munice."]; 
sleep 15;              
tskbox setSimpleTaskDescription ["Insurgents Have to have ammo stored somewhere around. Find it and destroy it! ", "Find Insurgent ammo.\n Najít povstaleckou munici.", "Munice"];         
tskbox setTaskState "Assigned";                          
A1 setCurrentTask tskbox;                             
taskhint ["Find Insurgent´s ammoSupplyes.\nNajděte Zásoby munice povstalců!", [1, 1, 1, 1], "taskCurrent"];  
Rumor = fizl addAction ["Small_Talk","rumor.sqf"]; 
Rumor2 = kecka addAction ["Small_Talk","rumor.sqf"]; 
Rumor3 = vnucka addAction ["Small_Talk","rumor.sqf"];

And i want the sqfs to be bradcasted globaly i change the code like that?

tskbox = A1 createSimpleTask ["Search for Insurgent ammo supplies.\nVypátrejte povstalecké zásoby munice."]; 
sleep 15;              
tskbox setSimpleTaskDescription ["Insurgents Have to have ammo stored somewhere around. Find it and destroy it! ", "Find Insurgent ammo.\n Najít povstaleckou munici.", "Munice"];         
tskbox setTaskState "Assigned";                          
A1 setCurrentTask tskbox;                             
taskhint ["Find Insurgent´s ammoSupplyes.\nNajděte Zásoby munice povstalců!", [1, 1, 1, 1], "taskCurrent"];  
Rumor = fizl addAction ["Small_Talk","rumor.sqf"];
publicVariable "Rumor"; 
Rumor2 = kecka addAction ["Small_Talk","rumor.sqf"];
publicVariable "Rumor2";  
Rumor3 = vnucka addAction ["Small_Talk","rumor.sqf"];
publicVariable "Rumor3"; 

And the Rumor.sqf wil be like that?

Rumor addPublicVariableEventHandler{
tskrumor = A1 createSimpleTask ["Smal Talk"];   
tskrumor setSimpleTaskDescription ["There are few places worth check for hidden Ammo storages. Ruins of Kumirna, Skalistý Ostrov,Kozlovka, or Čertův Hrad.", "Idle Chat", "Rumor"]; 
tskrumor setTaskState "Assigned";  

tskrumor setTaskState "Succeeded";   
taskhint ["There are Few places where it would be possible to hide some ammo. Kumirna, Skalistý Ostrov, or Čertův Hrad also Kozlovka people are rumored to be suportive towards the insurgency.", [0, 1, 0, 1], "taskDone"];

fizl removeAction rumor;
kecka removeAction rumor2;
vnucka removeAction rumor3;
} 

Share this post


Link to post
Share on other sites

Before answering (give a day or so, time zone difference), an important question:

Is this a coop mission (players against AI), or an adversarial mission (players against other players)? I ask because in coop missions you can use "player", but in adversarial missions it is necessary to filter who will run the Event Handler scripts (East v. West v. Independent), and maybe which teams they are on.

Share this post


Link to post
Share on other sites

It is COOP mission. Against AI.

Oh you mean to replace A1 with player, do you?

Share this post


Link to post
Share on other sites

For a coop mission, replacing A1 with Player is okay - then any player can gather the rumor. The others will receive the rumor when their event handler goes off.

But if you only want A1 to gather the rumor, the addaction has to be coded to only show for him.

The Init.sqf is where the event handler goes. It will download onto each player's machine when they join the mission.

Init.sqf:

"rumor" addPublicVariableEventHandler 
{
// Assign and Succeed the task:"rumor".
tskrumor = player createSimpleTask ["Smal Talk"];
tskrumor setSimpleTaskDescription ["There are few places worth check for hidden Ammo storages. Ruins of Kumirna, Skalistý Ostrov,Kozlovka, or Čertův Hrad.","Idle Chat","Rumor"];
tskrumor setTaskState "Assigned";
tskrumor setTaskState "Succeeded";    

// Show message.
taskhint ["There are Few places where it would be possible to hide some ammo. Kumirna, Skalistý Ostrov, or Čertův Hrad also Kozlovka people are rumored to be suportive towards the insurgency.",[0, 1, 0, 1],"taskDone"];

// Remove the addAction so duplicates don't occur.
fizl removeAction rumor;
kecka removeAction rumor2;
vnucka removeAction rumor3;
};

The task:"box" trigger will go off when it's detection occurs - use Player so it will occur for everyone:

trigger onAct.:

// Assign the task:"box".
tskbox = player createSimpleTask ["Search for Insurgent ammo supplies.\nVypátrejte povstalecké zásoby munice."];
tskbox setSimpleTaskDescription ["Insurgents Have to have ammo stored somewhere around. Find it and destroy it! ", "Find Insurgent ammo.\n Najít povstaleckou munici.", "Munice"];
tskbox setTaskState "Assigned";
player setCurrentTask tskbox;
taskhint ["Find Insurgent´s ammoSupplyes.\nNajděte Zásoby munice povstalců!", [1, 1, 1, 1], "taskCurrent"];

// Add rumor message to the target sources.
Rumor = fizl addAction ["Small_Talk","rumor.sqf"];
Rumor2 = kecka addAction ["Small_Talk","rumor.sqf"];
Rumor3 = vnucka addAction ["Small_Talk","rumor.sqf"];

Now when a player approaches fizl, kecka or vnucka, the "Small_Talk" addAction menu appears. The player who runs the addaction will also run the rumor.sqf on their machine:

rumor.sqf:

// This script only runs on the machine of the person who activates the addAction "Small_Talk".

// Assign and Succeed the task:"rumor".
tskrumor = player createSimpleTask ["Smal Talk"];
tskrumor setSimpleTaskDescription ["There are few places worth check for hidden Ammo storages. Ruins of Kumirna, Skalistý Ostrov,Kozlovka, or Čertův Hrad.","Idle Chat","Rumor"];
tskrumor setTaskState "Assigned";
tskrumor setTaskState "Succeeded";    

// Show message.
taskhint ["There are Few places where it would be possible to hide some ammo. Kumirna, Skalistý Ostrov, or Čertův Hrad also Kozlovka people are rumored to be suportive towards the insurgency.", [0, 1, 0, 1], "taskDone"];

// Remove the addAction so duplicates don't occur.
fizl removeAction rumor;
kecka removeAction rumor2;
vnucka removeAction rumor3;

// Broadcast variable "rumor" so other player's event handler will run the same code.
publicVariable "rumor";

When the player who makes "Small_Talk" broadcasts publicVariable "rumor", the event handler for the other players will fire off its code.

As you can see, the event handler has the exact same code as rumor.sqf, but minus the public variable.

On the sender's machine, the rumor.sqf assigns task and removes addactions, then broadcasts. On the receiver's machines, the eventhandler assigns task and removes addactions when the broadcast is received. The sender's event handler does not go off.

-----------------------

Adding another observation:

The Init.sqf is good for assigning the event handlers of simple coop missions; but when a mission uses many event handlers the Init.sqf can get pretty full. So the eventhandlers can all be put in a script executed by the Init.sqf, and they will still go on each player's machine when they join the mission - just be sure not to have "if (isServer)" blocking it from the player's machine:

In Init.sqf:

PV = [] execVM "PublicVariables.sqf";

In PublicVariables.sqf:

"tskInitial"	addPublicVariableEventHandler {Initial 	 = [] execVM "task1.sqf";};
"tskConvoy"	addPublicVariableEventHandler {Convoy 	 = [] execVM "task2.sqf";};
"tskDisrupt"	addPublicVariableEventHandler {Disrupt 	 = [] execVM "task3.sqf";};
"tskGuard"	addPublicVariableEventHandler {Guard 	 = [] execVM "task4.sqf";};
"tskRespond"	addPublicVariableEventHandler {Respond 	 = [] execVM "task5.sqf";};
"tskSearch"	addPublicVariableEventHandler {Search 	 = [] execVM "task6.sqf";};
"tskIntel"	addPublicVariableEventHandler {Intel 	 = [] execVM "task7.sqf";};
"tskCompleted"	addPublicVariableEventHandler {Completed = [] execVM "task8.sqf";};

true

Share this post


Link to post
Share on other sites

Thank you. YOu are the best. I would probably never figure that on my own.

Share this post


Link to post
Share on other sites
Last thing in SOM is real pain in the ass: I put this trigger http://i.imgur.com/EdRooIE.jpg and a chopper, to have my own on mapclick transport. It works sometimes, but most of the times the heli arives where i called it to, but then either just howers abowe, or it will land, but before we get into it, it will take of again, and will hower above and not respond to anything.

Hello again, Mirek

I've been integrating SOM's with my Warfare mission, and got the Transport support working perfectly, using its map-click, radio calls and all... except for this same occasional nagging issue you encountered, and I recalled you mentioned it here earlier, seeking a solution. :confused:

I found that the Support call doesn't complete until the SOM Leader disembarks and the chopper starts to fly off. Until then, the support remains active in the list, under "Transport (Active)". You can use that to get the chopper to land again.

If the chopper does its annoying little tease by going into hover, have the person who called the chopper go into map and hover cursor nearby where you want it to land. Then have them go to the SOM support menu again and select "Transport (Active)". The chopper will land where they have the cursor positioned on the map.

It will do this for pickup and unload. The call is also cursor "context sensitive" in game, so while making the call they can point their rifle exactly where they want it to land (because the map doesn't always show scattered bushes and trees).

It has to be the player who made the support call doing this, it won't respond to others who might have SOM's linked. The chopper responds to the Scope for the specific SOM that called it. The others will just end up calling another transport, if they have it available.

Some other lessons learned:

- If you're looking at mountains in the distance when calling the support, that's where the chopper will go. It's because the call is cursor "context sensitive". Where you aim is where it goes. (That may be why your chopper occasionally fails to arrive - It was my problem a few times. I resolved it by forcing map and a map-click check.)

- AI pilots are cautious. They won't land exactly where you tell them if there are objects near, they will instead move to a clear position, and may or may not land. So pick a large clear spot for landing. You can use the map method to redesignate the LZ or use the cursor "context sensitive" in game, pointing your rifle exactly where you want them.

- AI pilots are also stupid. When taking off they fly a straight line to the designated LZ, without regard for trees or mountains surrounding the LZ. If there are trees or hills next to the departing chopper in the direction of the chosen destination, they will often crash into them because they're trying to move in the destination direction at the same time they're trying to climb. So again, make sure you choose a LARGE open area for an LZ. (I believe they fly straight line because they're set to combat mode "BLUE" and behavior "CARELESS" when spawned.)

- IMPORTANT: The Group Leader who made the call MUST be "last on" and "last off" the bird. Check is made to see if the Leader synched with the active SOM has boarded or disembarked, then moves on to the next phase. It doesn't check for the leader's troops. So make sure the troops are on board before the Leader boards, and make sure the troops are disembarked before the Leader disembarks; otherwise the chopper will fly off, either leaving people behind, or taking away your troops.

- You can designate paths for the chopper to follow using the map. This can be done for pickup, or for drop-off. Remember, they fly straight line to the designated LZ. But the support doesn't move to the next phase until the leader has embarked or disembarked. You can use the pickup and dropoff points as waypoints by the Leader not boarding or disembarking.

EXAMPLE 1: You have a danger zone on one side, and a safe approach path you want them to use. Go to map and position the first LZ out from the safe approach path. When the chopper gets there, redesignate the LZ at your landing zone. The chopper will depart the original LZ, and come in through the safe approach path. You can do this as many times as needed to keep the transport safe. The support will not move into its next phase until the leader who called the support boards the chopper. (This can still be tricky however, in that the spawn location for the helo is random. You don't know which direction the chopper will spawn in.) (Disregard last, I see you refer to a TSS custom vehicle placed in editor, so you should know where it comes from - its base. I haven't used that in my Warfare mission yet.)

EXAMPLE 2: If you have a danger zone directly in path between your pickup point and the dropoff point, you do not want the helo flying you over it. But it will if you simply mark the LZ. So first go to map and designate an LZ off to the side. When the chopper gets there, DO NOT disembark. go to map and designate another LZ that skirts around the danger zone. When the chopper gets there, don't disembark, designate a final LZ at the dropoff point. When the chopper arrives, then disembark. This way, the chopper makes a three-point arc around the danger zone. You can do this as many times as needed to stay safe in transport. The support will not go into its next phase until the leader who called the SOM disembarks the chopper.

You also don't need to wait for the chopper to land before designating a next LZ. It can be approaching and will divert as soon as you designate the next waypoint LZ.

Edited by OpusFmSPol

Share this post


Link to post
Share on other sites

Hey, theese things i am aware of. The problem lyes somewhere else.

In my mission the chopper works Perfectly whenewer i test the mission myself. When anyone else joins me, the chpper starts fucking arround and refuse to land.

So far i came up with idea to put a trigger radio delta with

transport land "LAND"

and use it whenever the chopper refuses to land, but i havent chance to test it yet.

Allso lately my mission grown so big that my computer cannot handle it and i get <15FPS if i try to test it. And also my workload is increasing, so iam considdering abbandoning the idea, split the mission into several single missions, and modifiing one of the awailable ACE domination missions for my needs.

Edited by Mirek

Share this post


Link to post
Share on other sites

After PC upgrade (i bought I7), iam again able to work on this mission. and iam solving yet another problem:

How do i make random civilians from ambient civilian module to have addaction on them? lets say i want 30% chance that civilian has some info. Also is there some other option to speak with civilian and optain intel than addaction?

Share this post


Link to post
Share on other sites
How do i make random civilians from ambient civilian module to have addaction on them? lets say i want 30% chance that civilian has some info. Also is there some other option to speak with civilian and optain intel than addaction?

ALICE allows custom code to run when a civilian initializes. The code is stored in an array defined under "ALICE_civilianinit".

https://community.bistudio.com/wiki/Ambient_Civilians#Set_variables_to_BIS_alice_mainscope_with_desired_values

The example given is:

[i][color="#808080"][bIS_alice_mainscope,"ALICE_civilianinit",[{_this addweapon "Mk_48"}]] call bis_fnc_variablespaceadd;[/color][/i]

Don't use that example.

I spent A LOT of time, and had one hell of a time, getting it to work. It's dependent on Functions and becomes a pain since Functions may not initialize by the time ALICE initializes. Not only that, my attempts at adding new variable space code using triggers didn't work as I drove town to town. The codes got added, but just didn't run. I suspect ALICE initializes everything at start and doesn't query the variable later.

Use this example instead - place in the ALICE init field:

BIS_alice_mainscope setVariable ["ALICE_civilianinit",[[b]{_this addweapon "Mk_48"}[/b]]];

The civilian men will have machine guns.

It works and is a lot easier.

You'll notice it uses an array to store the code. That's because in the array you can define more than one block of code to run when each civilian spawns. When they spawn they run each set of code in the array. Note: Be sure to separate code blocks with commas ","

BIS_alice_mainscope setVariable ["ALICE_civilianinit",[[b]{_this addweapon "Mk_48"[/b][color="#FF0000"]},{[/color][b]hint "hello"}[/b]]];

I suggest only placing your code in the ALICE module's init field if it is simple and short, like the example above. For more complex code, put it at beginning of your init.sqf. Don't let it be delayed by any "waitUntil" or "sleep".

Tested on Utes, clean map with player and ALICE module;

I got this to work, putting it in init.sqf:

BIS_alice_mainscope setVariable ["ALICE_civilianinit",[

{
	// First set of code in the array - give the civilians guns.
	_this addweapon "Mk_48"
}

,		// comma here, to separate elements in the array

{
	//second set of code in the array - talk when a player approaches.
	_talk = true;

	while {alive _unit} do
	{
		sleep .2;

		if ((_unit distance player < 5) && _talk) then 
		{
			hint "Hello!";
			_unit globalChat "Hello!";

			_talk = false;
		};
	};
}
]];

- Replace the code with anything you want.

- Get rid of the first set of code and comma if you want everything in a single block of code.

- If you wish to add a third block of code, insert a comma and another block before the final line: ]];

Final note: You'll notice the first block of code uses _this and the second block of code uses _unit. Both are referencing the civilian being initialized. You can use either one to reference the civilian running the code.

For the 30% random chance, insert this in the code:

_random = random 100;

if (_random < 30) then {....do this....};

Edited by OpusFmSPol

Share this post


Link to post
Share on other sites

thanx man!

Share this post


Link to post
Share on other sites

AAArgh!! Why this thing doesnt work?

I placed civilian policeman unit and put this:

this addAction [ "Tak co se dÄ›je?", { tskmine = player createSimpleTask ["Minefield"];     tskmine setSimpleTaskDescription ["Cesta pÅ™ed námi je zaminovaná, VyÄistÄ›te ji!", "Minové pole", "Minové pole"];   tskmine setSimpleTaskDestination (getMarkerPos "Minen"); tskmine setTaskState "Assigned"; player setCurrentTask tskmine;  taskhint ["Cesta tady v pravo je asi zaminovaná,\nAsi v půlce je nÄ›jakej vrak \na lidi tam dneska ráno slyÅ¡eli explozi.", [1, 1, 1, 1], "taskCurrent"];  } ];

to its init field, but i have no action on that unit. i want to aproach the unit scroll my mouse wheel, and get the option to ask him "Tak co se děje?" and get task from him.

tried to name that unit "fizl" and put it in trigger like this

fizl addAction [ "Tak co se dÄ›je?", { tskmine = player createSimpleTask ["Minefield"];     tskmine setSimpleTaskDescription ["Cesta pÅ™ed námi je zaminovaná, VyÄistÄ›te ji!", "Minové pole", "Minové pole"];   tskmine setSimpleTaskDestination (getMarkerPos "Minen"); tskmine setTaskState "Assigned"; player setCurrentTask tskmine;  taskhint ["Cesta tady v pravo je asi zaminovaná,\nAsi v půlce je nÄ›jakej vrak \na lidi tam dneska ráno slyÅ¡eli explozi.", [1, 1, 1, 1], "taskCurrent"];  } ];

niether does work.

Edited by Mirek

Share this post


Link to post
Share on other sites
AAArgh!! Why this thing doesnt work?

I think you have to call the code from a script file, i.e.:

this addAction [ "Tak co se děje?", "taskMine.sqf" ];

The parameters for addaction say you can use code, but it also says using code is "(since Take on Helicopters)", which is after OA. I tried and it won't work in OA.

It also says: "or string with code", but I tried that too, and it doesn't work in OA. Using code in a string, it searches for a script file.

Maybe code in a string is another option available since TKOH or A3, but the parameter description doesn't say so. A2/OA seems limited to calling a script file.

https://community.bistudio.com/wiki/addAction

Share this post


Link to post
Share on other sites

OH Iam Full retard!!! Of course its TKoH only! Thank you man!!

Share this post


Link to post
Share on other sites

Please sign in to comment

You will be able to leave a comment after signing in



Sign In Now
Sign in to follow this  

×