Jump to content
Sign in to follow this  
kiptanoi

Pilot is dead, but script say he is alive

Recommended Posts

I use this a trigger to go to this file if plane is shoot down.

Plane1Down.sqs

~10
; hint "plane is down";

marker = createMarkerLocal ["obj5", position plane1];
"obj5" setMarkerShapeLocal "ELLIPSE";
"obj5" setMarkerSizeLocal [300, 300];
"obj5" setMarkerColorLocal "ColorRed";
"obj5" setMarkerBrushLocal "SOLID";

;Create Objectives 
obj5 = player createSimpleTask ["Find crached plane"];

;Objectives Description
obj5 setSimpleTaskDescription["<marker name='obj5'>The plane crached in this area.</marker>", "Find crached plane", ""];

;Lets player see sign on screen
[objNull, ObjNull, obj5, "CREATED"] execVM "CA\Modules\MP\data\scriptCommands\taskHint.sqf";
;Set current markerposition
obj5 setSimpleTaskDestination markerpos "obj5";

All is fine there...

Then next step is a trigger to know if I am close to the plane, and when I am that this file is next.

Plane1Found.sqs

if (alive pilot1) then 
{
; hint "pilot is alive";
marker = createMarkerLocal ["obj6", position pilot1];
"obj6" setMarkerShapeLocal "ELLIPSE";
"obj6" setMarkerSizeLocal [200, 200];
"obj6" setMarkerColorLocal "ColorRed";
"obj6" setMarkerBrushLocal "SOLID";
DeleteVehicle checkpilot1;
deleteMarkerLocal "obj5"

;Create Objectives 
obj6 = player createSimpleTask ["Find pilot"];

;Objectives Description
obj6 setSimpleTaskDescription["<marker name='obj6'>Pilot location</marker>.", "Find pilot", ""];

;Lets player see sign on screen
[objNull, ObjNull, obj6, "CREATED"] execVM "CA\Modules\MP\data\scriptCommands\taskHint.sqf";

;Set current markerposition
obj5 setSimpleTaskDestination markerpos "obj6";

; Objective complete
"obj5" objStatus "DONE";
obj5 setTaskState "Succeeded";
"obj5" objStatus "Succeeded";
} 
else 
{
; hint "pilot is dead"; 
DeleteVehicle checkpilot1; 
deleteMarkerLocal "obj5"; 
; Objective complete
"obj5" objStatus "DONE";
obj5 setTaskState "Succeeded";
"obj5" objStatus "Succeeded";
};

Now here is the problem

I got the same message all the time. that the pilot is alive..

But I can see the pilot is not eject when he shoot down.

And script create a marker at pilot position, and I go there..

Then this sctipt is going in.

Pilot1Found.sqs

if (alive pilot1) then 
{
; hint "pilot is alive";
[pilot1] join player;

;Create Objectives
obj7 = player createSimpleTask ["Take pilot with you"];

;Objectives Description 
obj7 setSimpleTaskDescription["You need to take that pilot with you.<br/>", "Take pilot with you", ""];

;// Lets player see sign on screen
[objNull, ObjNull, obj7, "CREATED"] execVM "CA\Modules\MP\data\scriptCommands\taskHint.sqf";

; Objective complete
"obj6" objStatus "DONE";
obj6 setTaskState "Succeeded";
"obj6" objStatus "Succeeded";
} 
else 
{
hint "pilot is dead";
DeleteVehicle checkpilot1;
deleteMarkerLocal "obj5";
; Objective complete
"obj6" objStatus "DONE";
obj6 setTaskState "Succeeded";
"obj6" objStatus "Succeeded";
};

Now... problem is as I say, I got the message that the pilot is alive, and I got a marker and a position and so on... even that there is no pilot alive...

And when I go to this location there is no pilot at all there.

So what is wrong?

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  

×