Jump to content

Recommended Posts

So i've looked around and what exactly is the right method of getting a unit (helicopter in this case) to move after a HOLD waypoint. I've read that they never complete so I have to use a SWITCH trigger or a SKIP WAYPOINT.

 

But I haven't succeeded in getting neither of them to work so far, I could just do a domove on a position but that would be really ugly with public variables that I don't want/need.

  _wpswitchtrig = createTrigger ["EmptyDetector", position _insertheli];
  _wpswitchtrig setTriggerType "SWITCH";
  _wpswitchtrig setTriggerArea [10, 10, 0, true, 200];
  _wpswitchtrig setTriggerActivation ["WEST", "NOT PRESENT", true];
  _wpswitchtrig setTriggerStatements ["player in thislist", "hint 'player left';", ""];
  _wpswitchtrig attachTo [_insertheli, [0,0,0]];

Share this post


Link to post
Share on other sites

I tend to just delete those hold waypoints when I don't need em anymore. (the downside is that the waypoints get renumbered)

https://community.bistudio.com/wiki/deleteWaypoint

 

If you don't want to do that, you could also use this to activate the next waypoint:

https://community.bistudio.com/wiki/setCurrentWaypoint

_grp setCurrentWaypoint [_grp, (currentWaypoint _grp)+1];
  • Thanks 1

Share this post


Link to post
Share on other sites

I would test that if it wasn't for my script not working anymore. Not sure what is going on maybe someone else can have a look i've already been at it for over an hour or two.

-snip-

It is a heli insertion script at random location, with random chance of a crash happening. Also random chance of making you fastrope down (with another script).

Strange thing is that it doesn't continue after line 86, where the line is

titleText ["Total Mission\n\n by Aseliot\n\nVersion 1", "BLACK IN", _fadein];

It fades in but doesn't show the titletext. 

So right now none of the code gets executed after that line the line (97)

hint "PLAYER ALLOW DAMAGE FALSE";

never displays.  :huh:

Share this post


Link to post
Share on other sites

I've had good results with just placing a trigger in Eden, setting the activation conditions to whatever I want, then setting the type to "skip waypoint". Not sure about creating the trigger through a script, though. "Skip waypoint" works and doesn't renumber anything. Also, I'm not sure about the exact situation, but as I understand it, you're attaching a "BLUFOR not present"-type trigger to a BLUFOR helo. That'll never trip, because there's always a BLUFOR unit present in the area (the helo it's attached to).

Share this post


Link to post
Share on other sites

I've had good results with just placing a trigger in Eden, setting the activation conditions to whatever I want, then setting the type to "skip waypoint". Not sure about creating the trigger through a script, though. "Skip waypoint" works and doesn't renumber anything. Also, I'm not sure about the exact situation, but as I understand it, you're attaching a "BLUFOR not present"-type trigger to a BLUFOR helo. That'll never trip, because there's always a BLUFOR unit present in the area (the helo it's attached to).

 

It does work because the condition is "player in thislist" and NOT PRESENT, so if player is not present. (That is without the SWITCH thing)

 

Current problem is my script doesn't get past line 86 for some reason now and I have no idea why :s

 

EDIT - Never mind a while loop was blocking the whole thing... it works now.

Share this post


Link to post
Share on other sites
On 7/15/2016 at 4:41 PM, Tajin said:

I tend to just delete those hold waypoints when I don't need em anymore. (the downside is that the waypoints get renumbered)

https://community.bistudio.com/wiki/deleteWaypoint

 

If you don't want to do that, you could also use this to activate the next waypoint:

https://community.bistudio.com/wiki/setCurrentWaypoint


_grp setCurrentWaypoint [_grp, (currentWaypoint _grp)+1];

 

It's perfect! 👌

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

×