sortel 0 Posted March 28, 2003 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 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
bn880 5 Posted March 28, 2003 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 Posted March 28, 2003 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
bn880 5 Posted March 28, 2003 </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. Share this post Link to post Share on other sites
sortel 0 Posted March 28, 2003 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
sortel 0 Posted March 28, 2003 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
bn880 5 Posted March 28, 2003 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
sortel 0 Posted March 28, 2003 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
bn880 5 Posted March 28, 2003 </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. 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
sortel 0 Posted March 28, 2003 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
bn880 5 Posted March 28, 2003 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 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
sortel 0 Posted March 28, 2003 Very cool! Â 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