Jump to content
Sign in to follow this  
Scanny

Interact with AI to follow waypoints

Recommended Posts

Hi all,

I want to make a script that allows the player (BLUFOR) to interact with a civilian via the action menu and have that civilian follow a created waypoint. For example, "Have elder get in truck" and the elder gets in a specified truck. I tried messing around with addWaypoint but it wasn't working.

Thanks

Share this post


Link to post
Share on other sites

Hi,

I just registered but I've been lurking here a loooong time. Maybe I can help.

Place a marker called "goto". Then, in your civilian's init, add:

this addAction ["Go!", "group (_this select 0) move markerPos ""goto"""];

move(1) basically clears a group's waypoints and adds a new one. You could achieve the same with addWaypoint(2). Keep in mind, addAction(3) is run locally so this won't work in MP as is.

Hope that helps!

/Jaeger

Stupid forum rules, try links here:

1. https://community.bistudio.com/wiki/move

2. https://community.bistudio.com/wiki/addWaypoint

3. https://community.bistudio.com/wiki/addAction

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  

×