View Full Version : Armor using Reverse and Throwing Grenades Automatically (Autocast)?
24th Sep 06, 6:04 PM
You can make a tank retreat in reverse instead of turning around to expose it's rear by queuing up move orders at small intervals behind it (not sure if they need a facing order). I'm looking for some way to change the movement AI so that it uses reverse within a larger area, so that it does 180 turns when given move orders that are far away.
And does anyone know how the grenade autofiring thing works and what needs to be edited? I know there was a mod for DOW.
22nd Jan 07, 6:35 PM
Maybe now there's more information on this?
22nd Jan 07, 6:39 PM
The mod for DOW (http://forums.relicnews.com/showthread.php?t=101868) did this using SCAR. It should be possible for CoH using SCAR also.
23rd Jan 07, 11:34 AM
Yes. It can be done. You'll need to copy the grenade weapon file and make a new weapon like grenade auto. In this change targeting to auto. Next create a new slot item to add the auto grenades to the squad. Create a new ability (I copyied the grenade throw ability) that will add the slotted grenades to the squad. Set the abiltity activation to timed. Then in self actions, have the slot weapon activate. Last, goto the squad-ai file of and call the new abilty with action_do_ability(name of abilty.lua). If you need more info, search on the post for smoke grenades (i can't remember the poster, but lots of credit to him) will give you a better understanding of how to do it. Hope this gets you going on the right track
24th Jan 07, 1:50 AM
Thanks for the help but I'm not sure I understand. What exactly should I put under self_actions? And which squad-ai file should I be looking at?
25th Jan 07, 12:51 PM
Make sure to set all actions under start actions to no action.
Under self actions. Add "add slot weapon" -- this is where you will add the grenades which are now a slot item. it should now use the grenade as its main weapon and target any enemy in range. in the end actions, remove the slot weapon and it will convert back to the rifle. Don't set the range any further than the grenade weapon that you cloned or the aninmation will get stuck.
in the infantry plan squad.ai file, you can add the action_do_ability(check the util squad-ai file to look at parameters) action anywhere you want and specify the number of casters (i used two)
go and have fun.
25th Jan 07, 12:58 PM
should I be using slots to add grenades to squads rather than just adding the ability_throw_grenade to a squad?
25th Jan 07, 2:40 PM
Yes. You create a slot weapon using grenades. Same way they do the BAR. Then using add slot weapon in the abilty makes the infantry switch to grenades. I'll try to post the necessary files when I really get a chance.
25th Jan 07, 2:58 PM
There is a difference in how some slot_items are handled. Some slot_items replace the main weapon the entity has, which is what the BAR does, while other slot_items don't like, which is what grenades and the Panzerfaust does. Panzerfausts work by using the use_accessory_weapon action, instead of replacing the soldier's rifle with a panzerfaust. This might be a better alternative.
26th Jan 07, 3:41 PM
That is correct on the slot items. The orginal grenade package did in fact do the use_accessory_weapon. However, the grenades would not automatically be cast for a player until they targeted something, unlike the BAR which would engage targets automatically. By replacing the main weapon with a grenade that is self targeting, the squad member will attempt to target and engage with grenades, if in range, without human intervention.
26th Jan 07, 5:36 PM
so hwo do you make the tanks not reverse automaticlly without rotation ?
4th Sep 07, 2:22 AM
does this method still cost the player money when the auto nade is thrown?
8th Sep 07, 10:57 AM
it won't cost if you remove the cost in the new ability.
Powered by vBulletin® Version 4.2.0 Copyright © 2013 vBulletin Solutions, Inc. All rights reserved.