Jump to content
Sign in to follow this  
sortel

West tank wont fire at object

Recommended Posts

I have seen several posts regarding getting tanks to shoot objects.  However, they all seem to reference things like cement blocks and other stuff that I can't seem to find.

Does anyone know how to get an East tank (say T72) to shoot a building, sandbag or any other object?  Why you say?  For the scare factor!

</span><table border="0" align="center" width="95%" cellpadding="3" cellspacing="1"><tr><td>Code Sample </td></tr><tr><td id="CODE">T72 doWatch someObj; T72 doFire someObj<span id='postcolor'>  It just spins around to watch the target, but just wont fire confused.gif

I also saw some folks talking about wrist watches and other West objects.  I can't find any in the editor.  Can a side be assigned to an object like a sandbag? Or are these custom objects?  If so, can they be created without a game mod?

As always, thanks!

Share this post


Link to post
Share on other sites

This should give you a hint!

</span><table border="0" align="center" width="95%" cellpadding="3" cellspacing="1"><tr><td>Code Sample </td></tr><tr><td id="CODE">_gunner commandWatch getPos _target

@_gunner knowsAbout _target == 4

;hint "got track"

~2

_gunner commandMove getPos _gunner;

_gunner commandTarget _target

~4

#engage

?!("Heat120" in (magazines m1)):goto"reload";

_gunner fire ["Gun120","Heat120"]<span id='postcolor'>

Share this post


Link to post
Share on other sites
Guest jacobaby

and there was another thread asking the same thing a few days back.

havent seen many tanks in iraq blowing up houses though......

Share this post


Link to post
Share on other sites

</span><table border="0" align="center" width="95%" cellpadding="3" cellspacing="1"><tr><td>Quote (jacobaby @ Mar. 28 2003,12:35)</td></tr><tr><td id="QUOTE">havent seen many tanks in iraq blowing up houses though......<span id='postcolor'>

Doesn't mean it's not happening. smile.gif

Share this post


Link to post
Share on other sites

Actually, I did read the previous thread about this.  However, it referenced "West" objects like wrist watches and concrete blocks all of which I can't find.  So, in the spirit of not "digging up old threads", I decided to start another.

Thanks for the tips all!  I'll give it a try.

BTW: Nobody has commented on the custom or "West" objects yet?  What was all of that about? Are there any?

Share this post


Link to post
Share on other sites

Close but no cigar:  Just as with my original code, the tank will target, swing around, and shoot a "West" jeep or any other "West" thing.  But, it will not target an object that it does not consider "West".

Are there any standard objects in the game that are considered "West" or can you set the side of an object after the fact?  Create a custom object?

Thanks all!

Share this post


Link to post
Share on other sites

You are going to have to supply the proper variables to the fire function which is the last line of what I posted. Does your gunner fire Heat120 shells out of the same muzzle as above? I doubt it.

Now I really have to do some lab work...

Share this post


Link to post
Share on other sites

Here is the exact code modified from above:</span><table border="0" align="center" width="95%" cellpadding="3" cellspacing="1"><tr><td>Code Sample </td></tr><tr><td id="CODE">; shoot.sqs

_tank = _this select 0

_target = _this select 1

_gunner = gunner _tank

_gunner commandWatch _target

@_gunner knowsAbout _target == 4

hint "got track"

~1

_gunner commandMove getPos _gunner

hint "moved - not sure why I need this"

~1

_gunner commandTarget _target

hint "targeted"

~1

_gunner fire ["Gun120", "Heat120"]

hint "should have fired"<span id='postcolor'>

Executed as: </span><table border="0" align="center" width="95%" cellpadding="3" cellspacing="1"><tr><td>Code Sample </td></tr><tr><td id="CODE">[eastTank, myTarget] exec "shoot.sqs"<span id='postcolor'>

All message appear, but it will not shoot a chair, fence, armored target, or any other non-west thing.  I also tried "Shell120"s.

Thanks all

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">_gunner fire ["Gun120", "Heat120"]<span id='postcolor'>

I think maybe the tank you are sending doesn't use this round or muzzle. confused.gif I know this code snippet I posted worked at least in 1.46.

EDIT: the move command was there to basically move the tank back into the position where the gunner had a sight of the target. If the tank is going at 80Km/h you want it at the exact spot where the enemy was clearly visible.

Share this post


Link to post
Share on other sites

I'll check into that. The tank is a T72 and I think that it has both, but I will research. Also, I am testing this under v1.46

Thanks.

Share this post


Link to post
Share on other sites

Ok I got it going again, the gunner is just the tank itself. So don't grab the actual gunner, just use the tank with all the commands.

the muzzle is Gun120 and the rounds are Shell120 and Heat120 biggrin.gif

You may have to play with removing all Shells or Heats to fire the other kind of round. But Heat120 works off the bat.

Share this post


Link to post
Share on other sites

Very cool!  biggrin.gif

Mine just started working just referencing the tank itself too.  However, it only finally worked when I did:</span><table border="0" align="center" width="95%" cellpadding="3" cellspacing="1"><tr><td>Code Sample </td></tr><tr><td id="CODE">_tank fire ["Gun120","Heat120","Heat120"]<span id='postcolor'>

I was missing the third parameter in (muzzle, mode, magazine).  I guess the mode is just the same for tanks, but all three seem to be needed.

Thanks a million!

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  

×