Jump to content
Sign in to follow this  
major_upset

Tanks to hold fire till

Recommended Posts

Hey guys, I'm back with a question, that's doubtlessly been asked a million times before.

Is there a code to stop tanks, troops, etc from firing untill their a set distance away from their target, say like 300 meters or whatever?

I'm sure I have read that you can do this, but I can't find the tread, and as always searching the forums as turned up nothing.

Cheers in advance.

Share this post


Link to post
Share on other sites
Hey guys, I'm back with a question, that's doubtlessly been asked a million times before.

Yea I'm sure it was. But you did some effort in searching so half is forgiven. biggrin_o.gif  wink_o.gif

Use a setCombatMode command, like

<table border="0" align="center" width="95%" cellpadding="0" cellspacing="0"><tr><td>Code Sample </td></tr><tr><td id="CODE">unitname setCombatMode "red"

What the colors means:

blue - never fire

green - hold fire

white - hold fire, engage at will

yellow - open fire

red - open fire, engage at will

Share this post


Link to post
Share on other sites

You can start these tanks with a waypoint to never fire, then create another waypoint to open fire at 300 ft away from their target.

I hope that kinda helped. huh.gif

Share this post


Link to post
Share on other sites
You can start these tanks with a waypoint to never fire, then create another waypoint to open fire at 300 ft away from their target.

I hope that kinda helped. huh.gif

Thanks guys. That'll help with the tanks that I've got advancing, smile_o.gif now that just leaves the stationary ones, however I think I can get round that one by putting...

<table border="0" align="center" width="95%" cellpadding="0" cellspacing="0"><tr><td>Code Sample </td></tr><tr><td id="CODE">tank1 setCombatMode "red"; tank2 setCombatMode "red"

In a trigger that's fired by the attacking force. as they roll though. But I'm sure there's a code you could drop into a unit's init box though.  huh.gif

Anyway cheers guys.

Share this post


Link to post
Share on other sites
But I'm sure there's a code you could drop into a unit's init box though.  huh.gif

But of course, the same code. wink_o.gif

Share this post


Link to post
Share on other sites
But I'm sure there's a code you could drop into a unit's init box though.  huh.gif

But of course, the same code. wink_o.gif

No I mean some sort of  <table border="0" align="center" width="95%" cellpadding="0" cellspacing="0"><tr><td>Code Sample </td></tr><tr><td id="CODE">unitname holdfiretill > 300; code wink_o.gif

Share this post


Link to post
Share on other sites
No I mean some sort of  <table border="0" align="center" width="95%" cellpadding="0" cellspacing="0"><tr><td>Code Sample </td></tr><tr><td id="CODE">unitname holdfiretill > 300;
code wink_o.gif

No, there's no such code. You can use setCombatMode with distance code in trigger's condition thou:

<table border="0" align="center" width="95%" cellpadding="0" cellspacing="0"><tr><td>Code Sample </td></tr><tr><td id="CODE">tank1 distance tank2 < 300

Share this post


Link to post
Share on other sites
Quote[/b] ]

<table border="0" align="center" width="95%" cellpadding="0" cellspacing="0"><tr><td>Code Sample </td></tr><tr><td id="CODE">tank1 distance tank2 < 300

ok cool, thanks for the info. smile_o.gif

Share this post


Link to post
Share on other sites
Curses! I've got a long way to go til I'm actually helpful. sad_o.gif

I'm still greatfull for the help.

Share this post


Link to post
Share on other sites

Thanks. That makes my day!

Well, I might have actually been able to offer help, but I haven't scripted in a while. sad_o.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  

×