Forum Jump :

Author Message


Posts: 44
Rank:


Level: Member

Country: nz
Location:
Occupation:
Age: 45
In-game name:

 
#1 Posted at 2009-08-10 05:26        
     
I have a mission where i have an empty helicopter that needs to be stolen and brought back to a helipad on base.
Its the last objective which will complete the mission. (It would be easy if it was just a extraction chopper, using waypoints in the editor, when it reaches the last waypoint the mission could end. But if you use a empty vehicle you cant assign waypoints to it in the editor. This is going to be a coop mission.

So im trying to make it work using some script code from an Arma1 mission i got working. But had to change some of the syntax.

What i have in the Trigger:

Activation when Blufor is present.

10 x 10 radius

Type: end#1

Con:
(alive ka1) or (alive ka2) and (player in ka1) or (player in ka2);

act: tskObj3 setTaskState "SUCCEEDED"; [tskObj3] call mk_fTaskHint;

The trigger accepts it no syntax errors. But when i run mission, to test it. It goes straight to the end of mission with debriefing. My unit i had to check trigger, wasnt even in the radius zone. The choppers are named correctly but are miles away, still empty.

Ive tried looking for a Arma2 mission that has steal a vehicle and return it to point x. Didnt find anything i could look over how they did it. The only other thing i can think of to make it work is check distance between helimarker and vehicle. But i dont know how to do that, i tried with a(getmarkerpos "lzka") == b(getpos ka1); I keeping getting a missing ; error with that one. But i think i have the right idea, but cant get it to work.

Do you guys know of any missions or scripts can deal with a scenario like this? Or suggest how i can solve this problem?
Surely landing a chopper on a designated marker to complete an objective cant be this damn hard?


Author Message


Posts: 1522
Rank:


Level: Member

Country: uk
Location:
Occupation:
Age:
In-game name:

 
#2 Posted at 2009-08-10 13:02        
     
Try it like this :-

Activation when Blufor is present.
10 x 10 radius

Type: end#1

Con:
this and (alive ka1) or (alive ka2) and (player in ka1) or (player in ka2);

act: tskObj3 setTaskState "SUCCEEDED"; [tskObj3] call mk_fTaskHint;

Without the "This and" it will just execute the cond box and not look at the other conditions of the trigger except the timer.