Jump to content
Sign in to follow this  
MintyBoy

Domove command

Recommended Posts

</span><table border="0" align="center" width="95%" cellpadding="3" cellspacing="1"><tr><td>Quote </td></tr><tr><td id="QUOTE">First, how do I use the DOMOVE command, and how would you make it so that if the hostage takers saw the people trying to save the hostage, they would attempt to kill the hostage? <span id='postcolor'>

Thought I'd make a new topic about this one, as it could branch off a bit... tounge.gif

DoMove-

This command is quite handy, as it allows you to tell individual members of squads to go somewhere. You just name the squadmember and, in a scriptor the activation field of a trigger/WP, put

</span><table border="0" align="center" width="95%" cellpadding="3" cellspacing="1"><tr><td>Code Sample </td></tr><tr><td id="CODE">[name] domove [location]<span id='postcolor'>

now [location] needs to be in [x,y,z] format but the easiest way to get a loc (if he's to go to a person) is to use GetPos. i.e.

</span><table border="0" align="center" width="95%" cellpadding="3" cellspacing="1"><tr><td>Code Sample </td></tr><tr><td id="CODE">[name] domove getpos sarge<span id='postcolor'>

Spotting Rescuers-

There are several ways to do this, either set up a "west detected by east" trigger, a "hostage not present" trigger (to see if your SpecOps have spirited him away, or get to know the very powerful "KnowsAbout" command.

Hope these give you some ideas. smile.gif

Share this post


Link to post
Share on other sites
Guest jacobaby

and you can combine it with UNITEADY to see when the unit is at the location

Share this post


Link to post
Share on other sites

Think someone could cover KnowsAbout and UNITEADY? I know I could search for them, but since you guys mentioned them, I thought it might be cool if you could expand on your points. smile.gif

Thanks. smile.gif

Share this post


Link to post
Share on other sites

Thanks Mintyboy for making a topic just for me. biggrin.gif Oh yeah, it helped me out a lot too. biggrin.gif

Share this post


Link to post
Share on other sites

DJOlmstead- No problem mate, happy to help. smile.gif

jacobaby- You sure it wasn't UnitReady you meant? tounge.gif

PFC Mongoose- Sure, why not. wink.gif

</span><table border="0" align="center" width="95%" cellpadding="3" cellspacing="1"><tr><td>Code Sample </td></tr><tr><td id="CODE">[unit] KnowsAbout [target]<span id='postcolor'>

Tells you if (and how much) the unit knows about the target. It returns a numerical value between 0-4. At 0, they have no idea that the target exists. At higher values and they know that something's there, but not what it is. All the way up to 4, where they know exactly what it is. Like in Cadet mode, where you seethe words [vehicle]-[man]-[soldier]-[machinegunner] as you get closer/use a sniper scope or binocs, etc.

To get it to be useful in a script, you need to decide how sensetive the guards/patrol/angry husband/whatever is going to be.

</span><table border="0" align="center" width="95%" cellpadding="3" cellspacing="1"><tr><td>Code Sample </td></tr><tr><td id="CODE">?(_leader knowsabout _dude)>0:goto "Triggered"<span id='postcolor'>

That is part of a guard script in one of the missions I'm making. Basically, if the leader knows someone's out there (knowsabout returns greater than 0) then does it's thing, otherwise, carry on repeating.

As it's in a very sensitive area, I've decided to make the guards really twitchy (you get a suppressed weapon as well, so it's also for balance). If you wanted to make them a tad less alert, just raise the number. Say you wanted them to be dumb hicks/reservists/conscripts/whatever, just up it to between 3-4 and they'll probably wait until they can see the whites of your eyes before screaming for help.. smile.gif

Now, this is all well and good for single guys and stuff, but if your mission involves more than just a couple of guards, it's quickly going to get tiresome typing that all the time, or calling the script a few dozen times. Sooo...

</span><table border="0" align="center" width="95%" cellpadding="3" cellspacing="1"><tr><td>Code Sample </td></tr><tr><td id="CODE">"[_x, ben] exec {guards.sqs}" foreach units group bill<span id='postcolor'>

The ForEach command lets you call the same script for lots of people very simply and easily, and saves a lot of typing. smile.gif

On to UnitReady...

This just lets you know if the unit's finished it's last command. Say you had part of a script.

</span><table border="0" align="center" width="95%" cellpadding="3" cellspacing="1"><tr><td>Code Sample </td></tr><tr><td id="CODE">bill domove getpos ben

bill action [explode]<span id='postcolor'>

Bill gets an order to move to Ben, then immediately gets an order to blow up (made up order, btw tounge.gif ). Bill won't get close enough to do any damage. What we need to do is wait until Bill gets to Ben, then blow up.

</span><table border="0" align="center" width="95%" cellpadding="3" cellspacing="1"><tr><td>Code Sample </td></tr><tr><td id="CODE">bill domove ben

@ unitready bill

bill action [explode]<span id='postcolor'>

This does exactly that. Gives Bill the order to move, waits until Bill reports ready and then does his thang.

I've just skimmed what I wrote and realised I waffled on a bit too much.. (should've been a teacher) smile.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  

×