Jump to content
BikerJoe

AI board AI controlled boat

Recommended Posts

I'm struggling trying to figure out a script for the following scenario and hoping someone can help...

 

  • AI with variable names "VIP", "BG1" and BG2" get rescued

(I just have a trigger set up so when a player gets close enough the boat gets underway, I have the boat linked to a "show/hide" module too so its hidden untilo the trigger is activated and it starts to move)

  • local forces dispatch a boat to come get them and take them to safety

I have a number of waypoints to get the boat to the HVIs then the boat has a "LOAD" waaypoint linked to a "GET IN" waypoint for the HVIs but nothing happens!)

  • boat stops and rescued hostages get in

I was thinking setting the script to a trigger thaty doesn't activate til the HVIs are in the boat?

  • boat leaves AO

I give the boat a waypoint away from the AO and a script to delete everyone in the boat along with the boat itself?

Share this post


Link to post
Share on other sites

Got a bit confused. Do you want to transfer everything in a script or to solve the LOAD waypoint issue?

 

In any sort of case the LOAD waypoint you mentioned is a risk. You can indeed use a MOVE waypoint for the boat and then sync a trigger to it so that the boat continues to move only when the HVIs are inside. Now as for the module you use to hide and unhide the boat you can simply use the:

 

 

hideObjectGlobal nameOfObject;

so as to avoid the use of the module. Modules sometimes lag the game. Another thing is that maybe the waypoint method you mentioned will not work. Waypoints on moving objects can also cause problems. Had tried to but a slingload waypoint on a moving object once and the chopper went to the initial place of the crate and then to the new position. If that happens with the GET IN waypoint in your case we will have to spawn a waypoint after the boat has arrived to pick them up. But maybe using a MOVE waypoint for the HVIs and having a trigger to activate the next GET IN waypoint only after the boat has arrived will work. Finally yes with the: 

 

deleteVehicle nameOfUnit; 

 

you can erase all units and vehicles   :thumbsup:

  • Like 2

Share this post


Link to post
Share on other sites

if you make the LOAD Wp to a HOLD and the make a TRIGGER with skip WP when your HVI are inside the Boat 

 

in the TRIGGER also make the HVI leave your GROUP and they join the Guys in the boat.

 

To delete your boat and units

just put a trigger on the map and put this inside the  ACT field :

{deletevehicle _x} foreach crew (thislist select 0); 
deletevehicle (thislist select 0);

and set the trigger to repeat.

And make a WP for the boat inside the trigger area..

  • Like 1

Share this post


Link to post
Share on other sites

Thanks to both of you and sorry for not replying for so long, I was otherwise engaged,

 

So I've set up the waypoints like ye said and now the boat stops at the waypoint but the HVIs just stand their at the waypoint and do nothing, is there some sort of script I can put in the waypoint to make them get into the boat?

 

 

Share this post


Link to post
Share on other sites

Ehm I did not understand what you did exactly and the images above have an add on them so they are too blurry. For the image uploads imagebb is cool.

  • Like 1

Share this post


Link to post
Share on other sites

Well first off:

  • can INDFOR units get in a BLUFOR vehicle? Because sometimes some factions cannot get in vehicles where other factions are in. Even when the latter factions are only in as passengers. That one I learned the hard way. Also, 
  • is the sync between the get in nearest and the hold waypoint needed? Have no experience with the hold waypoint so I would just use a move one for the boat and as a condition in a trigger simply put:
nameOfUnit1 in nameOfBoat && nameOfUnit2 in nameOfBoat && nameOfUnit3 in nameOfBoat

the getInNearest waypoint is really nice if activated once the boat is near.

  • To do that you can have a move waypoint for the units before the getInNearest waypoint. That move waypoint will  be activated once the boat is near with something like:
     
nameOfBoat distance aMarkerName < 15 

That should work.

  • Like 1

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

×