Fenris 0 Posted November 16, 2002 Howdy all, 1) Is there a generic wait command in the editor. For example I have a trigger that issues a radio message when activated, and I want there to be a delay before the reply. At mo I can't figure out how it can be done easily. It would also be handy for parachuting scripts as you could have the first unit eject, wait 1, second unit eject etc... 2) I asked this before but how can you add waypoints to vehicles you create using the createvehicle command? Or would I have to use the domove command? In which case, how do you assign the different waypoint types? Also I'm a bit vague on the co-ordinates, how do you tell where a location is using the SetPos type co-ordinates? Hope that makes sense Share this post Link to post Share on other sites
Azz -GUN- 0 Posted November 16, 2002 </span><table border="0" align="center" width="95%" cellpadding="3" cellspacing="1"><tr><td>Code Sample </td></tr><tr><td id="CODE">~X <span id='postcolor'> X being a value in seconds </span><table border="0" align="center" width="95%" cellpadding="3" cellspacing="1"><tr><td>Code Sample </td></tr><tr><td id="CODE"> _Unit1 action ["EJECT",Chopper] ~1 _Unit2 action ["EJECT",Chopper] <span id='postcolor'> You cant addWaypoints to vehciles not placed in the editor. what you could do is place game logic untits and then use the doMove command </span><table border="0" align="center" width="95%" cellpadding="3" cellspacing="1"><tr><td>Code Sample </td></tr><tr><td id="CODE">myUnit doMove getPos gameLogic1<span id='postcolor'> now you could have a trigger over this gamelogic then on west present: </span><table border="0" align="center" width="95%" cellpadding="3" cellspacing="1"><tr><td>Code Sample </td></tr><tr><td id="CODE">myUnit setBehaviour "Safe"<span id='postcolor'> Share this post Link to post Share on other sites
Fenris 0 Posted November 16, 2002 You're a star Azz!! Thank you very much! Share this post Link to post Share on other sites
Doolittle 0 Posted November 16, 2002 To wait, send your guys to some waypoint and then make a Switch Trigger and for the Condition have your condition like "not alive Ginger" or whatever, then for OnActivation you don't have to do anything. Â The soldier at the waypoint will continue on when the switch is true. Or if you are doing your radio trigger thing, when you have the trigger activated, just select Countdown and fill out Min, Max, Mid values (there's three so you can put some randomness in there). Â Once the trigger activates it'll count down that amount of time. Â Timeout setting means the trigger must remain true for that set time. To have vehicles you create use waypoint, you need to have a driver for that vehicle! Â createVehicle makes empty vehicles. Â You'd need to createUnit too and tell them to get in. Â Before you do all that, make a group and do all their waypoints, then you could setDamage 1 kill the group. Â Now createVehicle and createUnit and moveInDriver that unit. Â Then assign that unit to the other group you made, then use the SoldierName doMove getWPPos [group object, 1] command. Â (WP 0 is always where the soldier starts out.) Â WP 1 would be the first place they go, etc. To use setPos place a marker that is Empty (clients can't see that) or use a Game Logic object. Â Give it a name, then refer to it with getPos GAMELOGIC or getMarkerPos "MarkerName". Â This'll return where those coordinates are. Â And for reference, bottom left of map is [0, 0, 0], top right is [128,000, 128,000, 0] (I think). You can always open up mission.sqm file (it's a text file) and see where the game is recording your objects' locations as being. WHOOPS, I just noticed Azz posted some stuff too...I need to learn to type faster. Doolittle Share this post Link to post Share on other sites
Fenris 0 Posted November 16, 2002 Cheers Doolittle, I think you've got a point with the createvehicle thing. A slight variation would be to stick the driver somewhere remote and set up the waypoints from there. Make the first WP dependant on the same trigger that creates the vehicle and then movein the driver to vehicle. Should work I guess... The ~x thing doesn't seem to work. i set up a trigger and in the 'on activation' field I put </span><table border="0" align="center" width="95%" cellpadding="3" cellspacing="1"><tr><td>Code Sample </td></tr><tr><td id="CODE">me sideChat "Looks like we've got light infantry supported by a BMP and a couple of machine gun nests. Over."; ~5; Commander sideChat "Roger that. See if you can take out some of that armour, we'll send an infantry squad to sweep and clear";<span id='postcolor'> but it comes back with 'invalid number in expression'. Am I being a muppet...? Cheers again you two!! Share this post Link to post Share on other sites
Fenris 0 Posted November 16, 2002 Oh, and as an extra query; when the sidechat message is displayed it lists me as Golf Red 1 which I guess is dependent on which order I set up the units. Anyway I can change this designation? Share this post Link to post Share on other sites
RED 0 Posted November 16, 2002 1. You need to use the ~X function in a script. It won't work with triggers. 2. Yes you can search for the command "setgroupid" in the command ref. RED Share this post Link to post Share on other sites
Doolittle 0 Posted November 17, 2002 Don't forget [west, "base"] sideChat "We found your mom." Doolittle Share this post Link to post Share on other sites
Fenris 0 Posted November 17, 2002 DooLittle, What's that supposed to do? I'm guessing it's a sidechat to West, saying it's from Base? That'd be really handy, but I couldn't get it to work... Share this post Link to post Share on other sites
RED 0 Posted November 17, 2002 Yes it does do that, just put in in an onactivation field of a trigger/script. RED Share this post Link to post Share on other sites
Fenris 0 Posted November 17, 2002 Just tried that in a script and it kicked up errors. What is the name of the Resistance side? I had just assumed it was 'Resistance'. Share this post Link to post Share on other sites
Fenris 0 Posted November 17, 2002 This is what's in my script. First bit runs okay... </span><table border="0" align="center" width="95%" cellpadding="3" cellspacing="1"><tr><td>Code Sample </td></tr><tr><td id="CODE">me sideChat "Looks like we've got light infantry supported by a BMP and a couple of machine gun nests. Over." ~5 [Resistance,"Commander"] sidechat "Roger that. See if you can take out some of that armour, we'll send an infantry squad to sweep and clear";<span id='postcolor'> Share this post Link to post Share on other sites
RED 0 Posted November 17, 2002 It is Res I think, also it has to be "base" not commander as far as I know. RED Share this post Link to post Share on other sites
Fenris 0 Posted November 17, 2002 Nice one, that did it! It is Resistance btw. Base is defaulting to PAPA_BEAR, anyway to change that ID? I know, I know, all these questions!! I am very appreciative Share this post Link to post Share on other sites