Jump to content

Ground units switch waypoint - does not happen...


Hoggorm

Recommended Posts

I've created a small test where a ground unit is supposed to drive along a road. At a T-junction the route go to the right, with another route to the left. At the T-junction I've tried to add a "Switch waypoint" Advanced waypoint action, but for some reason the ground unit ignores this and always turns right.

 

(As a side note I've also added a hold command at WP 2, but the unit also ignores this and turns around to WP 3 then stops at WP 4)

 

Any idea what is going on here?

 

GND Unit Switch waypoint.png

Link to comment
Share on other sites

9 hours ago, dark_wood said:

Try to change the start condition from "Probability" to "time more", maybe is a bug.

 

Thank you Dark Wood.

 

I tried with time more and it is working somewhat strange. The unit was now driving up to the intersection then took a right 270 deg turn to join the route to the left, but stoppet shortly after WP3 for some reason...

 

I've also tried with triggers instead of probability, but it will not turn then either...

Link to comment
Share on other sites

3 hours ago, dark_wood said:

Well, AI can behave weird, maybe you should place two units, one for each path, with later activation, and activate just one, depends on what you want to achieve there...

 

Yes, that is one solution, but it takes a bit more time to create...

Link to comment
Share on other sites

Hey Hoggorm,

I presume you want to randomise this event and the answer is relatively simple:

1.       Set up a random flag as per image

2.       In the units triggered actions setup 2 Go to waypoint actions as per image.

3.       Add a small trigger zone just before the junction.

4.       Setup an AI PUSH TASK based upon each flag value

When the unit enters the zone the flag will be triggered randomly and it will turn left or right based upon this premise.

Here is an example mission too. Hope that helps. Cheers.

RANDOM.PNG

GOTOTASK.PNG

GWP2.PNG

GWP3.PNG

JUNCTION.miz

Callsign: NAKED

My YouTube Channel

 

[sIGPIC][/sIGPIC]

Link to comment
Share on other sites

12 hours ago, SUNTSAG said:

Hey Hoggorm,

I presume you want to randomise this event and the answer is relatively simple:

1.       Set up a random flag as per image

2.       In the units triggered actions setup 2 Go to waypoint actions as per image.

3.       Add a small trigger zone just before the junction.

4.       Setup an AI PUSH TASK based upon each flag value

When the unit enters the zone the flag will be triggered randomly and it will turn left or right based upon this premise.

Here is an example mission too. Hope that helps. Cheers.

 

 

 

Hello SUNTSAG,

 

Thank you very much!

 

I studied the example file you so kindly uploaded. Running through it I see that the tank indeed randomize a left or right turn as you so correctly assumed was my goal.

 

I can absolutely follow and understand your instructions here. They do make sense and the outcome is also what I want.

 

Still learning the Mission Editor I still have a few questions on what is going on though. Your solution worked perfectly, but I do not understand why my solution did not..?

 

1 - To me an advanced waypoint action at WP1 telling the unit to switch to WP3 should do jus that, but it does not.

 

2 - If there are no "Hold" commands at WP2 or WP3 the tank drives completely randomly around until it settles down. These are four spots it ended up.

 

Junction.png

 

3 - Based on your example I adjusted it a bit so that the random flag 1 was set at mission start. Although not required in this little test this allows for flag 1 to be used for several other random tasks in a mission. If I left the trigger zone in, and had the tank drive up to it, the same expected result happen as in your example. The tank choose either right or left based on the value of flag 1.

 

Now, If I instead say that flag 1 value 1 should turn flag 2 (for WP2) on, and Flag 1 value 2 should turn flag 3 (for WP3 on), and add those conditions to advanced waypoint action the result is again something completely different. If the tank is supposed to turn right it will initially turn to the left, then back to 3 and not hold there (even though a hold command is present), but randomly park somewhere as I see when there is no hold command at all.

 

Now what I'm scratching my head about is that I do not really understand what the difference is between your method, that indeed solved the issue, and my method that do not.

 

The only difference seem to be that you use a trigger zone and trigger actions while I use no trigger zone, but instead advanced waypoint actions and flag/conditions.

 

4 - I guess my last question is when should I use advanced waypoint actions and when should I use trigger actions?

 

5 - I've included my own adjusted mission file based on the one you uploaded for you to see what I've done.

 

 

JUNCTION 2.miz


Edited by Hoggorm
Link to comment
Share on other sites

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...