Jump to content
Sign in to follow this  
Phantom Six

New objective available after current ones completed & Village Cleared Problem

Recommended Posts

Hey, I have 3 problems while creating a mission.

1) One of the objective was to clear a village, and I put a trigger where if OPFOR is not present, then objective is complete. Problem was there are OPFOR units but the mission will automatically be completed at the start for some reason.

2) I'm trying to make a trigger that will create a new objective after all current objectives are complete. I'm trying to make one that appear and say "Get to Extraction Zone", but I get this error: Missing ;

I put this as condition

obj_1 && obj_2 && obj_3 && obj_4 && obj_5 && obj_6 && obj_7 && obj_8

This is my On Activation

tskobj_9 = player createSimpleTask ["Reach Extraction Point"] tskobj_9 setSimpleTaskDescription ["All task complete, now get to the LZ and extract"] tskobj_9 setSimpleTaskDestination (getMarkerPos "extraction");

3) I'm trying to put generalcarver's revive script in my map but its not showing up. I put the folder called "script" inside the folder of my map and copy n pasted the code from the sample mission into mine. Idk how to implant scripts though, but tried to follow the instruction but im kind of lost on that

Share this post


Link to post
Share on other sites

for num2:

are obj_1 to obj_8 boolean types?

if there not, then the trigger wont fire because a condition has to return either true or false. using the name of the variable in a condition is like saying obj_1 == true, so if its a number or a string, it wont fire off and youll mostly get an operator error.

for num1: are you setpos or spawning the units in? remember the trigger checks all the time for the condition so if your spawning units in then the trigger will fire it off as complete, because there werent any opfor at the start of the mission there.

also make sure you set it to activated by opfor, not present.

as for your error:

tskobj_9 = player createSimpleTask ["Reach Extraction Point"];
tskobj_9 setSimpleTaskDescription ["All task complete, now get to the LZ and extract"];
tskobj_9 setSimpleTaskDestination (getMarkerPos "extraction"); 

you were missing semicolons on each block, so it gave you an error because it doesnt know when one block ends and another begins.

always separate commands and blocks with a semicolon, its the equivalent of a new line.

i dont know about 3, never used revive scripts

Share this post


Link to post
Share on other sites

for num1 i already put OPFOR is not present and i setpos them. For num2, Idk where to put the semicolons cuz i just cut n paste it off my briefings n delete that. As for condition, what do i put? For num1, do I need to put anything in condition? Because it is empty right there.

Share this post


Link to post
Share on other sites

that might be your problem with the first one. If your setpos them from a place outside the trigger area, then it auto activate as complete, since the trigger checks faster than the setpos goes to work. you dont need to put anything in condition, just leave it as "this" as that is the condition to check for opfor not present.

for num2. If you say you copied it from your briefing, then it should have been sorted out into lines of code. you have to know where the syntax for code ends, and because the syntax inside the editor is sqf, you need to put semicolons to break lines. I assume your briefing is an sqs file?

for ex.

_myvar = 0;

_unit = player;

player setpos [getpos player select 0, getpos player select 1, (getpos player select 2) + 5];

notice how each lines ends with a semicolon, this is how you must write it into a trigger or anything in the editor.

heres some more info about the syntax:

http://community.bistudio.com/wiki/sqf

Share this post


Link to post
Share on other sites

Actually my brieifing as an sqf file so idk what to do bout that part. As for the trigger, the opfor are already in the trigger area and it still does auto active complete.

Share this post


Link to post
Share on other sites
that might be your problem with the first one. If your setpos them from a place outside the trigger area, then it auto activate as complete, since the trigger checks faster than the setpos goes to work. you dont need to put anything in condition, just leave it as "this" as that is the condition to check for opfor not present.

for num2. If you say you copied it from your briefing, then it should have been sorted out into lines of code. you have to know where the syntax for code ends, and because the syntax inside the editor is sqf, you need to put semicolons to break lines. I assume your briefing is an sqs file?

for ex.

_myvar = 0;

_unit = player;

player setpos [getpos player select 0, getpos player select 1, (getpos player select 2) + 5];

notice how each lines ends with a semicolon, this is how you must write it into a trigger or anything in the editor.

heres some more info about the syntax:

http://community.bistudio.com/wiki/sqf

Oh thanks xD for the first problem, i accidentally deleted this from condition. I readded this and it works now. Now I need to figure out how to add revive n make a new objective for extraction n i guess it should be done

---------- Post added at 01:20 PM ---------- Previous post was at 11:59 AM ----------

ok i put this for condition

obj_1 = true; obj_2 = true; obj_3 = true; obj_4 = true; obj_5 = true; obj_6 = true; obj_7 = true; obj_8 = true

This for on activation

tskobj_9 = player createSimpleTask ["Reach Extraction Point"]; tskobj_9 setSimpleTaskDescription ["All task complete, now get to the LZ and extract"]; tskobj_9 setSimpleTaskDestination (getMarkerPos "extraction");

Seems like I got no error anymore so now I'll just need to test that out, add a revive script and its good to go

Share this post


Link to post
Share on other sites

glad its working, but just to clear things up here

if this is in the condition of a trigger or if statement, then you need to use AND or && to check if all the objectives are completed.

so much like this:

obj1complete == 1 && obj2complete == 1 && obj3complete == 1 && etc

or with booleans:

obj1complete && obj2complete && obj3complete && etc

this tells the condition logically that first task AND second task AND third task must be completed before this event can happen (or in your case 8 tasks)

Share this post


Link to post
Share on other sites

Kk I got the blufor chopper to work now. I put this in the condition

helicopter in thislist;

I sync that to the chopper and seems like that works to ending the mission. Well only one problem left which is very minor is my max slot problem on choosing the map

-Max slots keep saying unknown though, I want it to say 7 (my description.ext here)

//Mission Header

class Header

{

gameType = Coop;

};

onLoadMission = "OperationPhantom_FallofShahkarCaliphate";

OnLoadMissionTime = False;

respawn = "INSTANT";

respawndelay = 5;

disabledAI=TRUE;

minPlayers = 1;

maxPlayers = 7;

playerCountMultipleOf =1;

};

Edited by Phantom Six

Share this post


Link to post
Share on other sites

Ok i got a new problem when testing it. My friend got the error that say this

you cannot play/edit this mission; it is dependent on downloadbale content that has been deleted. caweapons_ammoboxes (I think i fixed that)

I did map this using combined operations because i could not launch operation arrowhead standalone because of the addons in the OA folder. I did not put any arma 2 content inside so i dont know what seems to be the problem

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

I open up notepad n deleted caweapons_ammoboxes n i think that does the trick

Edited by Phantom Six

Share this post


Link to post
Share on other sites

I tried this tskobj_1complete && tskobj_2complete && tskobj_3complete && tskobj_4complete && tskobj_5complete && tskobj_6complete && tskobj_7complete && tskobj_8complete

obj1complete && obj2complete && obj3complete && etc that what u suggested

and the objective doesn't show up after I completed all the objectives

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  

×