Jump to content

Recommended Posts

Hi,

 

I'm using a trigger to spawn AI (CSAT) boats and make them move to a waypoint (to chase the blufor boats) and I am getting a "generic code error" when I try to do this. The code I have so far is as follows:

 

group_2 = creategroup east;  enemy2 = group_2 createVehicle ["O_Boat_Armed_01_hmg_F ",getmarkerpos "spawn2",[],0,"form"]; enemy2 domove (getmarkerpos "waypoint2")

This code is situated in the activation section of the trigger. I have a dot marker set as spawn2 and a circle marker set as waypoint 2 (as I'm spawning a load of ground units at the same time who spawn at spawn1). Any help is greatly appreciated.

 

Thanks

 

Share this post


Link to post
Share on other sites

Instead of spawning new units, I find it easier to move existing units from one place to another.

.

 

Share this post


Link to post
Share on other sites
11 hours ago, Arma Llama said:

group_2 = creategroup east;  enemy2 = group_2 createVehicle ["O_Boat_Armed_01_hmg_F ",getmarkerpos "spawn2",[],0,"form"]; enemy2 domove (getmarkerpos "waypoint2")

 

 

 

Wrong usage of createVehicle command.... among other things:

 

enemy2 = "O_Boat_Armed_01_hmg_F" createVehicle getmarkerpos "spawn2"; group_2 = createVehicleCrew enemy2; enemy2 domove (getmarkerpos "waypoint2")

 

Share this post


Link to post
Share on other sites
11 hours ago, Arma Llama said:

Hi,

 

I'm using a trigger to spawn AI (CSAT) boats and make them move to a waypoint (to chase the blufor boats) and I am getting a "generic code error" when I try to do this. The code I have so far is as follows:

 


group_2 = creategroup east;  enemy2 = group_2 createVehicle ["O_Boat_Armed_01_hmg_F ",getmarkerpos "spawn2",[],0,"form"]; enemy2 domove (getmarkerpos "waypoint2")

This code is situated in the activation section of the trigger. I have a dot marker set as spawn2 and a circle marker set as waypoint 2 (as I'm spawning a load of ground units at the same time who spawn at spawn1). Any help is greatly appreciated.

 

Thanks

 

 

You could use a script that has this ability already, eg the one in my sig.....

 

👇

Share this post


Link to post
Share on other sites
On 5/25/2020 at 8:54 AM, dreadpirate said:

 

You could use a script that has this ability already, eg the one in my sig.....

 

👇

I would but I honestly have no idea of what to do with scripts 

Share this post


Link to post
Share on other sites
21 minutes ago, Arma Llama said:

I would but I honestly have no idea of what to do with scripts 

 

We all started out that way.....

 

There's a demo mission provided with the script that you can open up and learn how everything works

Share this post


Link to post
Share on other sites
On 5/25/2020 at 9:49 AM, pierremgi said:

 

Wrong usage of createVehicle command.... among other things:

 

enemy2 = "O_Boat_Armed_01_hmg_F" createVehicle getmarkerpos "spawn2"; group_2 = createVehicleCrew enemy2; enemy2 domove (getmarkerpos "waypoint2")

 

 

Did you test it?

  • Like 1

Share this post


Link to post
Share on other sites
On 5/28/2020 at 8:13 AM, pierremgi said:

 

Did you test it?

Hey sorry, yeah I forgot to come back and say thanks!

 

Worked as you did and allowed me to spawn two boats with waypoints, so huge thanks for that !

  • Like 1

Share this post


Link to post
Share on other sites

In the future, refer to my AI compilation list as a reference, as there are many threads, scripts, ect,. in the list

that may cover the area in which you need help with for AI. Cheers!

 

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

×