Jump to content
febriannas

Trigger CONDITION if a Sector is captured by a faction

Recommended Posts

Trigger condition for if an obj dead

!alive obj

(this bolean if CONDITION , Dead of an Object, right?)

is there any trigger condition for

(CONDITION of a ,Captured SectorModule by a Faction,is ?)

Share this post


Link to post
Share on other sites

There is a trigger condition for Seized by (Blufor, Opfor, Independent).

Share this post


Link to post
Share on other sites

Are you referring to "ModuleSector_F" Under modules in Multiplayer>Sector or "ModuleMPTypeSectorControl_F" in Gameplay Modes>Sector Control?

Your question isnt very specific and written like pure code with little explanation.

Also check these out if they help any:

http://forums.bistudio.com/showthread.php?159426-The-new-Sector-Module

I dont know what your level of arma code knowledge is so i dont mean to insult it.

---------- Post added at 17:25 ---------- Previous post was at 17:24 ----------

There is a trigger condition for Seized by (Blufor, Opfor, Independent).

Im sure he wants to know how, not just if it exists. Care to elaborate?

Share this post


Link to post
Share on other sites

Im sure he wants to know how, not just if it exists. Care to elaborate?

Under the activation drop down is "Seized by (side)" click and there you go, seized is defined by, within a certain trigger area there is only "x" units from "x" side ("x" being Blufor,Opfor,Indep) within its bounds. So say you have a Seized by Blufor trigger over a town that you wanted to clear, if there are any enemies within the trigger area (the town) the trigger will still return false, until either the enemies leave the area or are killed at which point the trigger fires and does whatever you have in the onAct field.

So basically I'm not necessarily using the sector control modules, I'm just using a trigger with a "Seized by" condition. For more information on the sector modules themselves reference this page.

For the !alive obj, yes that will be considered true if the object/unit/vehicle is destroy/killed/deleted.

Edited by JShock

Share this post


Link to post
Share on other sites

The expression field in the sector control module can run code whenever the sector ownership changes. The passed arguments are [<module>, <ownerSide>, <previousOwnerSide>].

Note: I don't advise to use seized by triggers or any other way of monitoring sectors now that we've legit SC module(s). Streamlined, more diverse, easy to set up. My2C. Cheers.

Share this post


Link to post
Share on other sites

If your trying to get a waypoint movement from a trigger make sure the "Type" is set to switch.

Share this post


Link to post
Share on other sites
Under the activation drop down is "Seized by (side)" click and there you go, seized is defined by, within a certain trigger area there is only "x" units from "x" side ("x" being Blufor,Opfor,Indep) within its bounds. So say you have a Seized by Blufor trigger over a town that you wanted to clear, if there are any enemies within the trigger area (the town) the trigger will still return false, until either the enemies leave the area or are killed at which point the trigger fires and does whatever you have in the onAct field.

So basically I'm not necessarily using the sector control modules, I'm just using a trigger with a "Seized by" condition. For more information on the sector modules themselves reference this page.

For the !alive obj, yes that will be considered true if the object/unit/vehicle is destroy/killed/deleted.

That method only does one side.

I did find this though under Modules/Category:Multiplayer/Module:Sector, Under module properties:

Expression_______

Description: "Code executed when sector ownership changes. Passed arguments are[<module>,<ownerSide>,<previousOwnerSide>]"

Seems like you can add a .sqf or code that executes when sector changes ownership, effectively a trigger. Sounds like it outputs an array that can probably be used with "this select X"

http://i.imgur.com/crKPQut.jpg (233 kB)

Edited by Benargee

Share this post


Link to post
Share on other sites

wow nice i got two solution from you guys

so using the "seized by trigger" , or , "the owner side trigger"

1.>ok maybe i just forget to change the type to "switch" and set up a double layered for it.

2.>and for the "sector module" so,

how actually i write the "sector module argument expression" for it?

and i have two waypoint there, what should i write on the "waypoint condition" or maybe the "trigger condition" to activate the waypoint?

sorry guys i know just a little about writing variable just 2 days ago starting to play with this arma editor, :p

---------- Post added at 22:41 ---------- Previous post was at 22:25 ----------

Or maybe set a new move task for the unit??

if so how to do it upon "seized by trigger"

i dont know how to make a move task

Share this post


Link to post
Share on other sites

2. and for the "sector module" so,

how actually i write the "sector module argument expression" for it?

So are you utilizing the sector module(s) now? Or... I'm confused. To write the expression for the actual sector module the simplest way is to place a sector module on the map and find the expression field...

Share this post


Link to post
Share on other sites

GUYS I FOUND THE SOLUTION!!!

to the condition

sector getvariable "owner" == west/east

 

just to be clear - this if for the benefit of guys like me whose lack of coding skills require that i painfully reconstruct what's being shared here to make head and tails of it. 

 

make the condition of a trigger:

sector_1 getvariable "owner" == west

where "sector_1" is the name of the sector in your seize module and "west" is the side you want to activate the trigger. 

 

and then make the "on activation" in that same trigger state the following; 

tsk1_done=true; publicVariable "tsk1_done";

if you do the same for any of the contested sectors in your mission and then you make a final trigger to end the mission where the condition field is something like this; 

tsk1_done && tsk2_done && tsk3_done

and you make the "on activation"; 

"end1" call BIS_fnc_endMission;

you will now be able to end your mission once the players seize all of the contested sectors from the AI. 

 

anyway, just figured i'd share how i used this information you guys unearthed. 

 

thanks again, 

 

Theopolus

Share this post


Link to post
Share on other sites

There is no need for you triggers for each sector. You can use the sectors Expression field in the editor to monitor each sector. e.g

Open the sector in the editor and place in its expression field..

if (_this select 1 isEqualTo west) then {tsk1_done=true; publicVariable "tsk1_done"}
The expression field runs the code it is given when ever the owner of the sector changes. The expression receives the parameters [module, new owner, old owner] so _this select 1 would be the new owner as above.

That just leaves your main trigger to determine mission end.

  • Like 1

Share this post


Link to post
Share on other sites

There is no need for you triggers for each sector. You can use the sectors Expression field in the editor to monitor each sector. e.g

Open the sector in the editor and place in its expression field..

if (_this select 1 isEqualTo west) then {tsk1_done=true; publicVariable "tsk1_done"}
The expression field runs the code it is given when ever the owner of the sector changes. The expression receives the parameters [module, new owner, old owner] so _this select 1 would be the new owner as above.

That just leaves your main trigger to determine mission end.

 

 

Larrow, 

 

Once again you have provided valuable info that will help me tidy up my mission ... thanks. Will implement this tonight when I get home from work. 

 

Thanks Again, 

 

Theopolus

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

×