Jump to content
Sign in to follow this  
Fenris

Q's

Recommended Posts

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 wink.gif

Share this post


Link to post
Share on other sites

</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

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. smile.gif

Doolittle

Share this post


Link to post
Share on other sites

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

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

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,

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

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

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

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

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

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 biggrin.gif

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  

×