PFC Mongoose 0 Posted March 31, 2003 I'm working on a Vietnam mission for 1.46, but at every junction in the road, there's a new peoblem. I've tried to look up solutions, but none of the usual fixes seem to work. I think what I need is some advanced scripting, but even after reading a couple of fine tutorials, including Devilchasers, I'm grasping the basics of scripting, but what I need right now seems fairly advanced, and specialized, and I'm not sure how to go about it. Overview.) There's an American camp in the woods north if Ia Trang, and the Americans haven't had any trouble, so they are all fairly casual at this point. Most of them are sitting around campfires, the commander and a few others arein a hut looking over a map, and a few men are on guard. The main river crossing is being watched, so the americans think they are safe, but little tdo they realise the VC are planning to cross the river at several points in small transport boats for a multi-pronged attack on the secluded camp. 1.) The first problem I have is getting people to sit around the campfires. I got one small group of 4 to do it, just using this setbehaviour "safe"; and this switchmove "effectstandsitdown" But even a group of six, spaced farther apart, refused to do it. Even if I set the above commands along with doStop this on each unit, most of them would get up and start wandering aimlessly. I have no idea how to prevent this. 2.) Similar to this, the sentries on either side of the door of the hut constantly felt the need to desert their posts and wander aimlessly. I manged to stop them with doStop this, but then they turn and face the hut, making them look like pretty foolish sentries. Neither Hold, nor Sentry would root them in place, only doStop. Similarily, the group inside the hut would always feel the need to turn and walk THROUGH THE WALL OF THE HUT, which none of them were particularily near, and standin in the field, when I just wanted them to stand around the map, facing it as if looking at it. doStop got them not to move, but again, they alway turn and face north. 3.) I have a sqaud of Viet Cong on the opposite shore of the river near a VC boat I d/led. The idea is that they board the boat, it crosses the river, drops them off, and waits. They then pick through the forest, attack the American camp, and when losses mount, retreat to the boat to cross back ot the far shore and safety. However; and this might be a problem with the boat AI itself, the damned thing won't cross the river. Even after the squad is inside, it turns as if to move (it starts facing west, and is supposed to move north to cross the river), but turns east, instead of north, and sops. It isn't that it can't move, as I have taken control of the boat driver and done the crossing manually, it just won't do it. Perhaps the water is too shallow and it gets confused. So, I was wondering if anyone knew of any solutions, scripts availiable that might help me out, or if anyone can come up with some snippets to help. If it helps, I can e-mail you or send over IRC or ICQ what I have done so far, in case I'm doing something horribly wrong. I have the SEB 'Nam Pack V1 (I'm running OpFlash 1.46) and the VC boat; which I can include with the mission in a zip file. Once this is done, I still need casualty checking COUNT UNIT scripts for the VC boats for any VC units forced to retreat, and for the American Helicopters, for any American units forced to retreat. I'm sorry to ask for so much, but it has the potential to be a wicked mission, and I'd really like to finish it. Thank you very much. - Mongoose Share this post Link to post Share on other sites
Skul 0 Posted March 31, 2003 2) Try giving them something to watch, like an invisible H. Not sure if this would work, but it's worth a try. Put an invisible H where you want them to be facing. Name the I.H. 'invh' or something, and name the two guards something then put dowatch in their Init fields. The code should look something like this. </span><table border="0" align="center" width="95%" cellpadding="3" cellspacing="1"><tr><td>Code Sample </td></tr><tr><td id="CODE">sentry1 dowatch invh<span id='postcolor'> and the same for the second guy </span><table border="0" align="center" width="95%" cellpadding="3" cellspacing="1"><tr><td>Code Sample </td></tr><tr><td id="CODE">sentry2 dowatch invh<span id='postcolor'> And the soldiers with the map. Exact same thing. Name the soldiers and map and tell the soldiers to 'dowatch' the map. That's all I can think of to help with that. Share this post Link to post Share on other sites
PFC Mongoose 0 Posted March 31, 2003 Wow, cool. I forgot about that. I need to test it, but I'm fairly certain that will work! Thanks, man! Well, that's one down... Share this post Link to post Share on other sites
MintyBoy 0 Posted March 31, 2003 As far as the "wandering sentries" thing you've encountered is concerned, the only thing I can think of is this: Are they part of a group? If so, does their leader have WPs to follow? If so, then that's your problem. Either ungroup them and group them back up when the shit hits it, or make sure the leader starts with a "move" WP ontop of himself with the name of your alarm trigger in the "condition" field (whoa, long sentence, got to stop doing that). If they aren't part of a group, again make sure each bloke has a "move" WP ontop of themselves, slaved to your alarm trigger. If that doesn't work, then I'm really confused and you may have found an excuse (reason, sorry )to get Resistance. Share this post Link to post Share on other sites
PFC Mongoose 0 Posted March 31, 2003 All the sentires, and each member of the command squad (the same command squad I asked for help on getting to the evac point with the chopper) are individuals. I actually didn't try putting a "move" WP right on top of them, I only tried "hold" and "sentry". I haven't even gotten to placing the 'alarm' trigger yet; that got held up by the VC boat antics. Though, I made a version where the VC start in the woods on the American side of the river. Staged a few attacks, and it looks like I'll have to up the number of VC, and set some random American patrols in the woods to slow their advance. As it is now, the VC come in from the sides, and an NVA squad hits from the rear. The NVA do some damage with an RPG, but get hosed, and the Americans easily mop up the poor VCs. I'll have to up their skill and rank a bit, it seems. I'll keep playing with it; though from how it looks now, the sheer amount of scripting and layered and interlocking triggers is going to make this a slow mission to complete. Thanks, though; at least you guys have given me a place to start from. Share this post Link to post Share on other sites
MintyBoy 0 Posted April 1, 2003 Something I've really got to add, now that I've actually had a full night's sleep (yay! ). Playmove and Switchmove seem to work a lot better when they're in the "on activation" line of a trigger or WP. If you use it in the unit's init-line, the vast majority of the time it won't work. So, the idea behind the "move" WP ontop of the unit was to put the playmove command in there, and slave the next WP after that to your alarm trigger (when you get round to making it ). Sorry, should have said all this yesterday... Share this post Link to post Share on other sites