Jump to content
Sign in to follow this  
vonsteimel

How to create & get AI to go to certain points based on triggers?

Recommended Posts

Is there anyway I can make AI go to different points based on certain triggers?

Say I have an AI solder.... If "trigger #1" goes of I want him to go to "Marker A". If "trigger #2" goes off I want him to go to "Marker B". And then Back to "Marker A" if "trigger #1" goes off again... and so on.

I have tried to using the CreateWaypoint command but could not get it to work....

I also tried creating a bunch of "Hold" waypoints and linking them all of them to the various "Triggers" except the one where I wanted them to go hoping that when a specific trigger went off he would go to the one waypoint that wasn't linked but instead he only went to the next consecutive waypoint... (i.e. I created WP#0(Hold), WP#1(Hold), WP#2(Hold), WP#3(Hold) and linked a trigger(switch) to WP#0, 1 & 2... He starts at WP#0 of course. I was hoping that when the trigger went off he would skip to waypoint #3) I would then do this with a number of triggers to the different waypoints so I could get him to go to a specific waypoint everytime a specific trigger went off.... I can't get it to work... Any suggestions?

I tried searching for existing posts to no avail...

Thanks,

VS

Share this post


Link to post
Share on other sites

Very basic way.

Trigger#1 set to activated by whatever way you want it and in the On Activation you could use

Soilder1 domove getmarkerpos "MarkerName";

Likewise with Trigger#2 just use a different marker for the unit to move to when the trigger gets activated.

Just name the markers what you want and away you go.

Share this post


Link to post
Share on other sites

More complicated way!

This little demo I did for you will show you how to execute scripts from your triggers.

A good start is to play around with Koni's suggestion and then look at this if you need it to be more complex.... which I think you do!

Hope it helps you in some way.... and starts you on your scripting journey into oblivion!

Share this post


Link to post
Share on other sites

That did it! exactly what I was looking for.

Thanks to you both...

VS

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  

×