screab Posted September 15, 2017 Report Share Posted September 15, 2017 Hello, I would like to make the AI upgrade a unit to another one if the unit is attacked by archers. Can this be done ? If so, where should I look ? 1 Quote Link to comment Share on other sites More sharing options...
Stan` Posted September 15, 2017 Report Share Posted September 15, 2017 @mimo @Sandarac Quote Link to comment Share on other sites More sharing options...
screab Posted February 6, 2018 Author Report Share Posted February 6, 2018 Can't anyone point me in the wright direction ? Quote Link to comment Share on other sites More sharing options...
Stan` Posted February 6, 2018 Report Share Posted February 6, 2018 Look in the js code on how the AI upgrade buildings I don't know the files sorry. And try to mimic the behavior. Quote Link to comment Share on other sites More sharing options...
fcxSanya Posted February 14, 2018 Report Share Posted February 14, 2018 For managing the attacked units see defenseManager.js:checkEvents , for upgrade -- I don't see any code where Petra issues 'upgrade' commands (doesn't it upgrade towers?), but it should be possible do to in the same way as all other commands (see 'Engine.PostCommand' calls in common-api/entity.js , 'upgrade' command definition in Commands.js, and its usage in gui scripts). 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.