Jump to content
Sign in to follow this  
FredTche

Need Help with Mission Tasks

Recommended Posts

To start, I'd like to admit that I am an editing noob with no skill at mission making and editing (as you will later see). That being said, here is my problem. I recently created a mission in which a blufor soldier must enter an enemy-controlled village and destroy the Ifrit parked in it. I would like to have 2 tasks; one of them being to find an ordnance box and retrieve explosives from it (maybe to have either a satchel charge or explosive charge in the inventory) and the other to actually destroy the Ifrit. The mission would end once the Ifrit is destroyed (regardless of how, in case the player ingenuously manages to do it without the explosives). I noticed task managing has become easier in Arma 3, but still don't know how to use it. Can anyone help me out?

Share this post


Link to post
Share on other sites

Thanks for the link; it seems to solve the issue of destroying the Ifrit, but what about the other task? How can I make a task that is to get an explosive from the box?

Share this post


Link to post
Share on other sites

I think the easiest way to do that is to activate a trigger when the explosive is in the player's inventory. Use a trigger with condition:

("Explosivename" in (magazines player))

On activation complete the "get explosives" task. To make things more straight-forward you might want to also set the ordnance box to only have one type of explosive (using its init field), or else the trigger will need to be activated if the player picks up any of the many explosives in the game.

Share this post


Link to post
Share on other sites
I think the easiest way to do that is to activate a trigger when the explosive is in the player's inventory. Use a trigger with condition:

("Explosivename" in (magazines player))

On activation complete the "get explosives" task. To make things more straight-forward you might want to also set the ordnance box to only have one type of explosive (using its init field), or else the trigger will need to be activated if the player picks up any of the many explosives in the game.

Although I haven't tried it out yet, that seems like an elegant solution, Zonkovic. Thanks for the help!

Share this post


Link to post
Share on other sites

Can be placed into a trigger or your init.sqf.

 
[
    player,   //assigned to?
    "Task1",  //task name here
    [
         "Grab the explosive charge from the crate.", //description goes here
         "Grab the explosives", //title goes here
         "Take Explosive Charge"  //gui goes here
    ],    
    getPos cratename, //where you want the marker, in this case the crate
    true //current task?
] call BIS_fnc_taskCreate

//this is your condition
"DemoCharge_Remote_Mag" in magazines player;

//this your on activation
[
    "Task1", 
    "SUCCEEDED", 
    true  //task hint
] call BIS_fnc_taskSetState

Edited by cobra4v320

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  

×