Jump to content
Sign in to follow this  
breeze

What am I typing wrong here please??

Recommended Posts

Whats wrong with this? I am doing a Tutorial and it tells me to add the following

"2" objStatus "DONE"; "obj2_done=true"

The way I understand it is that the first command updates the objective and the second command is a variable that sets the condition to true so that we can ask later if its true for whatever else we want to use it for

But I keep getting a type string error

Share this post


Link to post
Share on other sites

Ok so wait a minute I am trying to write a trigger are you saying that the trigger I am trying to create is not going to work because we do this entirely different?

The Page your showing me I'm not sure how to go about setting up these tasks having them number or set them in an assemblance of order. Any tutorials on this because this is kind of slowing down my mission tutorial LOL

---------- Post added at 10:32 PM ---------- Previous post was at 10:31 PM ----------

Is this a separate file now that I set up in notepad?

Share this post


Link to post
Share on other sites

The tutorial looks like it might be made for Arma 1 or OFP. It would be helpful if you tell what you want to achieve. It appeared to me you were trying to create a briefing/objectives? Are you making a condition or activation of a trigger? Are you using a trigger to add a briefing/objectives?

Tasks (the new objective system) have no specific order of completion as such. Then you should only make them when you want them to be available. However if you add them in the order to be completed most players will probably start with the first one and proceed.

What are you trying to accomplish?

Share this post


Link to post
Share on other sites

Well thanks I looked at what you sent me and then took a breifing from another mission so yes I created it But I should still need to create triggers for the status of each objective yes? so that it updates and sets the next objective?

Share this post


Link to post
Share on other sites

Yes you still need to make the triggers/script that does the updating. In MP this can become significantly more complex to do correctly.

Share this post


Link to post
Share on other sites

well how do I get that to work my first post is where I am trying to get a trigger to react to a condition is that incorrect?

Share this post


Link to post
Share on other sites

In the trigger to mark the task (named tskObj1 in this example) as done:

tskObj1 setTaskState "SUCCEEDED"; taskhint ["Task done!\nGood job!", [0, 1, 0, 1], "taskDone"];

To use later to see if it's done:

taskState tskObj1 == "SUCCEEDED"

Share this post


Link to post
Share on other sites

Thanks alot now can I have the trigger pick my next task automatically?

Share this post


Link to post
Share on other sites

LOL man thats nice ok If one of my tasks is to steal a car the condition I thought would be moveindriver blufor that isn't working so any idea here?

Share this post


Link to post
Share on other sites

moveInDriver is a command, not a condition. Here's a way to do it manually, with triggers. Definitely NOT the way you want to do it, but it shows you all the commands to use. Ideally you'd use external scripts to make this easier on you.

Setup: You, a punkKid, are told to kill a poorGirl and steal her sweetRide. But under no circumstances should you kill her adorableGoat.

Triggers: Initial Task Setup, Did you kill the goat?, Did you kill the girl? and Did you steal the car?

So we place all the players down, the girl, the goat, the car (default Locked) and whatever else. Place markers on the three spots as well, then create the triggers:

Trigger One - "Initial Task Setup":

Condition =

true

onAct =

tskKillGirl = player createSimpleTask ["Kill Girl"]; 
tskKillGirl setSimpleTaskDescription ["Kill the girl picnicing with her pet goat.", "Kill the Girl", "Girl Picnicing"];
tskKillGirl setSimpleTaskDestination (getMarkerPos "girlMarker");

tskDontKillGoat = player createSimpleTask ["Don't Kill Goat"]; 
tskDontKillGoat setSimpleTaskDescription ["The goat has nothing to do with it.  Don't harm it.", "Don't kill the goat!", "Protected Goat"];
tskDontKillGoat setSimpleTaskDestination (getMarkerPos "goatMarker");

tskKillGirl setTaskState "Assigned";
player setCurrentTask tskKillGirl;
taskhint ["Kill the girl,\nbut not the goat!", [1, 1, 1, 1], "taskCurrent"];

So when you load in, since the trigger is set to true it'll automatically fire. You'll get your tasks (press J to verify) and a on screen task hint telling you to kill the girl and not the goat.

Trigger Two - "Did you kill the goat?":

Condition =

!alive adorableGoat

onAct =

tskDontKillGoat setTaskState "Failed"; 
taskhint ["You killed the goat!!", [1, 0, 0, 1], "taskFailed"];
"goatMarker" setMarkerColor "ColorRed";
tskDontKillGoat setSimpleTaskDescription ["Seriously, I said don't kill the goat, so what do you, you kill it!  I hate you.", "GOAT KILLER!", "Dead Goat Here..."];  

Pretty simple, if you kill the goat you fail that task. We also turn it's map marker red so you never forget... We'll also change the text on the Don't Kill The Goat task to make it clear what a jerk you were.

Trigger Three - "Did you kill the girl?":

Condition =

!alive poorGirl

onAct =

tskKillGirl setTaskState "Succeeded"; 
taskhint ["You killed the girl!!\nGood job!", [0, 1, 0, 1], "taskDone"];

tskStealCar = player createSimpleTask ["Steal Car"];
tskStealCar setSimpleTaskDescription ["Steal the girl's sweet ride.", "Steal Sweet Ride", "Car Parked Here"];   
tskStealCar setSimpleTaskDestination (getMarkerPos "carMarker");  
taskhint ["Now steal her sweet ride!", [1, 1, 1, 1], "taskNew"];
player setCurrentTask tskStealCar;  

sweetRide lock false;

If you kill the girl we'll mark that task as succeeded and give you a green colored hint that you were successful. Then we'll create a new task to steal the car and assign it to you along with a new hint that you should steal the car. We'll also finally unlock the car which has remained locked till now to make sure you finished the girl task first.

Trigger Four - "Did you steal the car?":

Condition =

player in sweetRide

onAct =

tskStealCar setTaskState "Succeeded"; 
taskhint ["You stole the car!", [0, 1, 0, 1], "taskDone"]; 
{deleteMarker _x} forEach ["goatMarker","girlMarker","carMarker"];

Lastly, once you're in the car we'll complete the steal car task, give you a nice green success hint and delete all the markers since you're done!

You can download a demo mission of this heartwarming experience to play around with in the editor.

Edited by kylania

Share this post


Link to post
Share on other sites

Thanks man I really appreciate that

---------- Post added at 06:50 AM ---------- Previous post was at 06:18 AM ----------

What do the numbers at the end mean the 1,0,0,1 at the end of the triggers mean?

Share this post


Link to post
Share on other sites
What do the numbers at the end mean the 1,0,0,1 at the end of the triggers mean?

Intensity of the color of the text and it's transparency value (Alpha).

[Red Value, Green Value, Blue Value, Alpha Value] From 0 to 1.

[color="Red"]Red[/color]: [1, 0, 0 , 1]
[color="Blue"]Blue[/color]: [0, 0, 1, 1]
[color="Lime"]Green[/color]: [0, 1, 0, 1]
[color="Cyan"]Cyan[/color]: [0, 1, 1, 1]
[color="Magenta"]Hot Pink[/color]: [1, .5, 1, 1]
[color="DarkOrchid"]Purple[/color]: [.5, 0, .5, 1]
[color="Black"]Black[/color]: [0, 0, 0, 1]
[color="White"]White[/color]: [1, 1, 1, 1]
[color="DarkOrange"]Orange[/color]: [1, .7, .4, 1]
[color="Yellow"]Yellow[/color]: [1, 1, .5, 1]
[color="Olive"]Olive[/color]: [.2, .4, .2, 1]

Edited by kylania

Share this post


Link to post
Share on other sites

Kylania so let me ask you a little more about these then, If I create a new mission and I want to destroy 4 AA guns but I want that as 1 Task yet I would like the soldiers to get waypoints to each of the guns if possible. Also If they come across one of the guns and destroy it I would like it to update and not make them go in any type of order.

Then I use the !(alive gun1) conditions in my triggers

And in the breifing

I can set the setsimpletask, settaskdescription, settaskdestination, settaskstate tieing them to markers

however can I get it to look like in the menu destroy AA Guns as one task and then still get 4 waypoints to show up as it happens???

Also if I want to cleat an area for a task and it has 30 soldiers but its dynamic so no way to know or list them all

I set a trigger !(alive opfor) in a specific radius?

Anyway I dont want to be a pain in the ass but your teaching me well :=)

Share this post


Link to post
Share on other sites

settaskdestination is the command that makes the marker/waypoint. It only makes one per task. However, you could probably in an order instead of all 4 at once.

In briefing you set it to the first one. In the trigger that checks if that gun is destroyed, make it call settaskdest (the position of the 2nd gun here). In 2nd gun's trigger set the destination to the 3rd and so on.

As for the area clearing. Why not just make the trigger cover the are you want to be cleaned and then set Opfor, Not present.

Share this post


Link to post
Share on other sites

I wanted to try and see if you guys would see this before making a new post. ok you have helped me make a couple of triggers at this point I have one trigger that executes when all of opfor die in a large area. and I have 4 guns which right now need to be taken down in succession ( Which I want to change) I would like the player to be able to choose which guns they want to take first second or third Id like to assign him his first just to give the Noob a waypoint when starting but aloow the experienced player the room to navigate however he wants to choose and take out the 4 targets,

Also when all 4 targets are taken out and all of opfor is cleared I want to execute the outro but I need a trigger or a way to know that either of these two things could happen in other words I want both conditions to be met for the outro to play but I dont care which is done first.

Share this post


Link to post
Share on other sites

Check for both the tasks to be completed.

Using my example from before, make a End1 trigger with this as the condition:

taskState tskKillGirl == "Succeeded" && taskState tskStealCar == "Succeeded"

Probably make it a Timeout with 10 as Min/Mid/Max for a 10 second wait after the tasks are achieved otherwise it'll abruptly change.

Share this post


Link to post
Share on other sites

Thanks again Bro, Now a proper outro and I might have a decent first mission soon.

---------- Post added at 05:59 AM ---------- Previous post was at 05:43 AM ----------

Hey Kylania how can I edit the other triggers so that the guns dont need to be taken out in any order? Can I suggest that they are by automating a waypoint but still counting whatever they do in whatever order?

Share this post


Link to post
Share on other sites

Personally I'd just put down markers where they are, or even just one marker saying "It's in this area". Or just one waypoint in the general area. Another possibility would be to put markers on each of the guns and have a task per gun.

They shouldn't have to be taken out in any specific order anyway, unless you were using waypoints to guide them, even then the trigger wouldn't care if you did the waypoints at all.

Share this post


Link to post
Share on other sites

Ahh ok so the trigger would assign their next task but it would still tick off in the briefing as done. Ok well that works then.

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  

×