Jump to content
shik4ri

Task set to complete when unit get in car

Recommended Posts

Hey,

how can I create a task, which set to successful when a unit (or me) get in a car?

greets

Share this post


Link to post
Share on other sites

Give your task a name, say "carTask". Then, add a GETIN waypoint for the unit (or you) to a vehicle and add this to the ON ACT:

carTask setTaskState "Succeeded";

Hope that helps!

Share this post


Link to post
Share on other sites

Or in the car's init field:

this addEventHandler
[
"GetIn",
{
	[_taskNameOrID,"Succeeded"] call BIS_fnc_taskSetState;
	(_this select 0) removeEventHandler ["GetIn",0];
}
];

Share this post


Link to post
Share on other sites
Or in the car's init field:

this addEventHandler
[
"GetIn",
{
	[_taskNameOrID,"Succeeded"] call BIS_fnc_taskSetState;
	(_this select 0) removeEventHandler ["GetIn",0];
}
];

nice!

Share this post


Link to post
Share on other sites
On 04/03/2015 at 0:26 AM, jshock said:

Or in the car's init field:

 


this addEventHandler
[
"GetIn",
{
	[_taskNameOrID,"Succeeded"] call BIS_fnc_taskSetState;
	(_this select 0) removeEventHandler ["GetIn",0];
}
];
 

 

Are you sure?? 

I tried it, it isn't working. 

Share this post


Link to post
Share on other sites

This solved my issue, thanks a lot guys! :eyeheart:

I'll post it here for the others to know how.

 

 

1- Place a unit give it a name.

2- Place an empty car and name it.

3- Place "Create Task Module".

4- Place "Set Task Module".

5- Place a trigger and write in its Condition field: player in car

where "player" is the name of that unit you placed and "car" is the name of the car you gave.

6- Sync player to "Create Task Module" then to Set task state then the trigger! as shown below.

 

 

6f48eca6-12da-4140-b242-1ac7c69bf2f8.jpg

 

 

 

  • Like 2

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

×