screab Posted September 15, 2017 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 Link to comment Share on other sites More sharing options...
Stan` Posted September 15, 2017 Share Posted September 15, 2017 @mimo @Sandarac Link to comment Share on other sites More sharing options...
screab Posted February 6, 2018 Author Share Posted February 6, 2018 Can't anyone point me in the wright direction ? Link to comment Share on other sites More sharing options...
Stan` Posted February 6, 2018 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. Link to comment Share on other sites More sharing options...
fcxSanya Posted February 14, 2018 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 Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now