cobalt red 0 Posted July 27, 2008 Title pretty much says it all. This is one of the very few snags preventing me from completing my first (good) mission. This is whats happening with the question: You reach a unit and they join your group, you take them to a trigger which once activated will remove them from your group. They already had a waypoint elsewere that I want them to go to after leaving the group. I'm good up to this point but I guess once they join the group their waypoint is deleted because of 'senority'? Any suggestions? And I cannot do a domove to a game logic or anything because one of the waypoints is a get in nearest. Thanks in advance. Share this post Link to post Share on other sites
Messiah 2 Posted July 27, 2008 I'd still say use the domove command, but then combine that with either: 1. Is it a specific vehicle he gets into at the point where you wanted to use getinnearest? If so, just have another trigger waiting for him to get to the domove location, and then make that order him into the vehicle (action GETIN command) 2. If you want to use nearest vehicle because you're not sure what vehicle will be there (thus my first suggestion wouldn't work) then you can manually do a Nearest Object then use the value returned so something along the lines of: <table border="0" align="center" width="95%" cellpadding="0" cellspacing="0"><tr><td>Code Sample </td></tr><tr><td id="CODE"> _nearestcar = nearestobject [yourAIsname, "car"] yourAIsname domove (getpos _nearestcar) @ (yourAIsname distance _nearestcar <= 1) yourAIsname action ["GETIN DRIVER", _nearestcar] exit Essentially the script would be activated by a trigger once your AI gets to the domove area. Once he's there, it checks whats the closest vehicle of type 'Car' (It can of course be car, tank, truck or left blank for anything) to the unit, then makes him move to that vehicle. The script then waits till he's within 1m of the vehicle in question, and then makes him get in. You may have to tweak the distance value depending on how close the AI feels like domoving to the vehicle. Without the domove and distance check, the AI will warp to the vehicle before getting in. Totally untested and off the top of my head, but that should be a start. Any further questions just ask. Share this post Link to post Share on other sites
cobalt red 0 Posted July 27, 2008 I'll test that out tonight after work, thanks a bunch. Also to be more specific, the vehicle is a chopper that lands after being called on the radio. Share this post Link to post Share on other sites
Messiah 2 Posted July 27, 2008 if its the same chopper every time, then just name the chopper, and then use method one. <table border="0" align="center" width="95%" cellpadding="0" cellspacing="0"><tr><td>Code Sample </td></tr><tr><td id="CODE">manname action ["GETIN DRIVER", choppername] add that to a trigger that activates once the man in question reaches the chopper area. Obviously substitute Driver for Cargo if he's meant to be a passenger. Share this post Link to post Share on other sites
cobalt red 0 Posted July 28, 2008 Didn't work, he just stands there. I might just make a dofollow command so he will end up continuing to the waypoint once in the LZ area. Share this post Link to post Share on other sites
Messiah 2 Posted July 28, 2008 hmmm, likely me using the wrong synthax - on reflection it should be: <table border="0" align="center" width="95%" cellpadding="0" cellspacing="0"><tr><td>Code Sample </td></tr><tr><td id="CODE"> yourman assignascargo choppername In a trigger, or something before he gets to the choppers, and then in a trigger at the chopper: <table border="0" align="center" width="95%" cellpadding="0" cellspacing="0"><tr><td>Code Sample </td></tr><tr><td id="CODE">[yourman] orderGetIn true Share this post Link to post Share on other sites
cobalt red 0 Posted July 28, 2008 Worked great, thanks a ton! Share this post Link to post Share on other sites
Messiah 2 Posted July 28, 2008 no drama, sorry for naffing it up first time round, I get confused between those two quite often. Share this post Link to post Share on other sites
cobalt red 0 Posted July 28, 2008 Ok, one more quick question. Basically what happens is you escort the unit to the lz, the chopper comes in and lands with a transpo unload waypoint, the guys in the chopper get out (to simmulate securing the lz) the guy who left the group gets in, once he gets in the guys who got out get in and it leaves. Only problem is that the chopper will either let everyone get in and then just sit there or once the escorted unit gets in it will take off a bit and then set down again, which looks stupid. I just want it to stay on the ground untill everyone who is supposed to be in is in. I've tried a lot of things, flyinheight, the next waypoin has a condition that all must be loaded in, even a disableai "move" but I either get one of the two mentioned results. I'll continue to look into it but if someone has the answer before I find it that'd be great, thanks. Share this post Link to post Share on other sites
Messiah 2 Posted July 29, 2008 does the chopper land on a Invisible H in the first place? I had the same problem during a cutscene of mine in OFP, and the choppers behavious doesn't seem to have changed much. I had them starting on the ground, blades turning and set to fly in height 0 - but as soon as the units turned up to get in, they took off and moved 10m to a new landing spot. Can't for the life of me remember how I solved it, but I do seem to recall an invisible H helped a little Share this post Link to post Share on other sites
cobalt red 0 Posted July 30, 2008 Yes, the chopper is landing on an invisible helipad. I'm stll working on it but if you figure it out befor eI do that'd be great. Share this post Link to post Share on other sites