Jump to content
Sign in to follow this  
Icaruk

Problem with addWaypoint + entering a vehicle.

Recommended Posts

My unit called "a", enters the trigger that has this:

null = [] execVM "rumbo.sqf";

rumbo.sqf

if (player == a) then {
camino = (group a) addWaypoint [(getmarkerpos "primero"), 0];
};

Okay, I have a waypoint, but when I enter in a helicopter, the waypoint just dissapears, if I go inside the trigger with the helicopter, the waypoint just appears 0,5 secs before dissapearing.

How can I fix this?

Thanks.

Share this post


Link to post
Share on other sites

You also need to use setWaypointType aswell before a waypoint can work. Not sure if that's your problem specifically, just thought I'd throw that out there. Hope that helps.

if (player == a) then {
   camino = (group a) addWaypoint [(getmarkerpos "primero"), 0];
   camino setWaypointType "MOVE"; 
};

Share this post


Link to post
Share on other sites

In the trigger, set the condition from this to player == a

rumbo.sqf would then be:

camino = (group a) addWaypoint [(getmarkerpos "primero"), 0];
camino setWaypointType "MOVE";

Untested, top of my head.

Share this post


Link to post
Share on other sites
You also need to use setWaypointType aswell before a waypoint can work. Not sure if that's your problem specifically, just thought I'd throw that out there. Hope that helps.

if (player == a) then {
   camino = (group a) addWaypoint [(getmarkerpos "primero"), 0];
   camino setWaypointType "MOVE"; 
};

It didn't worked, it was "move" by default :(

In the trigger, set the condition from this to player == a

rumbo.sqf would then be:

camino = (group a) addWaypoint [(getmarkerpos "primero"), 0];
camino setWaypointType "MOVE";

Untested, top of my head.

It didn't worked, anyways I need to use the same trigger for b, c, d... I must be "this" on the condition.

Thanks guys, any ideas?

Share this post


Link to post
Share on other sites
It didn't worked, it was "move" by default :(

I see. According to the wiki, setWaypointType is needed at minimum for an waypoint to function. In any case, what exactly are you trying to do? Maybe I can offer a faster/better solution for you.

---------- Post added at 02:39 ---------- Previous post was at 02:18 ----------

Here's a working example. I've no problems with waypoint disappearing. Are you sure it's not to do with your difficulty settings? IE; waypoint info settings etc?

Share this post


Link to post
Share on other sites

Okay I just understood the problem, when you are in a helicopter, if you get closer than 500m of the waypoint, it completes.

I tried

camino setWaypointCompletionRadius 50;

but it does nothing :/

Share this post


Link to post
Share on other sites

Check the example mission I posted.

---------- Post added at 02:47 ---------- Previous post was at 02:41 ----------

You are correct, waypoint goes away at 500m. That'd be your problem =)

Share this post


Link to post
Share on other sites
Check the example mission I posted.

---------- Post added at 02:47 ---------- Previous post was at 02:41 ----------

You are correct, waypoint goes away at 500m. That'd be your problem =)

Yes, there is a way to make it to not going away at 500m?

Share this post


Link to post
Share on other sites

Why do you want a chopper fly for a 500 mts trip????

And if the player is in cargo, maybe changing the waypointtype to getout won't make it dissapear, as it won't be completed until you getout.

Share this post


Link to post
Share on other sites

You just need to put a distance check in waypoint statement

I think it should be like this but can't test right now.

camino setWaypointStatements ["this distance waypointPosition [group  this, currentWaypoint group this] < 10", ""];

Share this post


Link to post
Share on other sites
Why do you want a chopper fly for a 500 mts trip????

And if the player is in cargo, maybe changing the waypointtype to getout won't make it dissapear, as it won't be completed until you getout.

This! It must be waypointtype GETOUT thanks! :D

You just need to put a distance check in waypoint statement

I think it should be like this but can't test right now.

camino setWaypointStatements ["this distance waypointPosition [group  this, currentWaypoint group this] < 10", ""];

Iceman77 solved it, thanks anyways! :D

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  

×