newcivs Posted December 29, 2013 Report Share Posted December 29, 2013 I mod the Pil Mahalmit's actor, i put a ptolomeaic tower and a javelinist inside and i have a question:how i can put an attack based on distance:the means the if the unit detects enemies on shoot distance of javelinists the javelinist gonna shoot their javelins, and if the enemies are nearing into the elephants the melee attack begins Quote Link to comment Share on other sites More sharing options...
sanderd17 Posted December 29, 2013 Report Share Posted December 29, 2013 This is not possible yet, but we're thinking about how to do it.You can give two attacks already, but the selection between the two won't be very good. Quote Link to comment Share on other sites More sharing options...
newcivs Posted December 30, 2013 Author Report Share Posted December 30, 2013 This is not possible yet, but we're thinking about how to do it.You can give two attacks already, but the selection between the two won't be very good.i can a succesfully attack, i only chang the parent entity for pil mahalmit fortemplate_unit_champion_cavalry_javelinist Quote Link to comment Share on other sites More sharing options...
newcivs Posted December 30, 2013 Author Report Share Posted December 30, 2013 i have a new bug with my mod, i hear calvary sounds not elephant sounds, but i patch ittemplate_unit_champion_cavalry_javelinist2the code:<Entity parent="template_unit_champion_cavalry"> <Armour> <Hack>4</Hack> <Pierce>5</Pierce> <Crush>6</Crush> </Armour> <Attack> <Ranged> <Hack>30.0</Hack> <Pierce>30.0</Pierce> <Crush>0.0</Crush> <MaxRange>56</MaxRange> <MinRange>0.0</MinRange> <ProjectileSpeed>50.0</ProjectileSpeed> <PrepareTime>1200</PrepareTime> <RepeatTime>2000</RepeatTime> <Spread>1.2</Spread> <Bonuses> <BonusPrimary> <Classes>Infantry Bow</Classes> <Multiplier>2.0</Multiplier> </BonusPrimary> <BonusSecondary> <Classes>Cavalry Sword</Classes> <Multiplier>1.5</Multiplier> </BonusSecondary> </Bonuses> </Ranged> </Attack> <Cost> <Resources> <food>100</food> <wood>70</wood> </Resources> </Cost> <Identity> <Classes datatype="tokens">Ranged Javelin</Classes> <GenericName>Champion Cavalry Skirmisher</GenericName> <Tooltip>Classes: Champion Ranged Cavalry Skirmisher.Counters: 2x vs. Archers, 1.5x vs. Cavalry Swordsmen.Countered by: Spearmen and Elephants.</Tooltip> </Identity> <Obstruction> <Unit radius="1.0"/> </Obstruction> <Sound> <SoundGroups> <select>actor/fauna/animal/elephant_select.xml</select> <order_walk>actor/fauna/animal/elephant_order.xml</order_walk> <order_attack>actor/fauna/animal/elephant_attack.xml</order_attack> <attack>actor/fauna/animal/elephant_attack.xml</attack> <death>actor/fauna/animal/elephant_death.xml</death> <trained>actor/fauna/animal/elephant_trained.xml</trained> </SoundGroups> </Sound> <UnitMotion> <WalkSpeed>14.0</WalkSpeed> <Run> <Speed>28.0</Speed> <Range>1000.0</Range> <RangeMin>10.0</RangeMin> </Run> </UnitMotion></Entity> Quote Link to comment Share on other sites More sharing options...
Radagast. Posted February 26, 2014 Report Share Posted February 26, 2014 Are you talking about javelinist in towers? Or ontop an elephant? I think via JavaScript you could decide yourself which unit to attack. So compare the nearest enemy position to your units position and decide whether the javelins' reach is enough. Once the enemies are coming too close draw back the javelinists and send in the melee. (all in javascript) 1 Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.