I have created my own unit, and it has abilities such as attacks,moves,magical skills.
But only when human players control this unit, these abilities can be used.
The unit controlled by computer AI will not use these abilities.
I want to write my own script for the unit, so computer AI can control it just as human does.
What should I do?
Could you please give me some advice?
Thanks!
I know essentially nothing about scripting like that, but could you get a similar effect by enabling auto-cast for the abilities? I've had a little luck with that myself anyway. You have to check the auto-cast and auto-cast enabled flags on the abilities and set auto-cast range (usually) and possibly some validators depending on what ability you're working with.
If that isn't what you need maybe someone else can help with the scripting side of things.
Rollback Post to RevisionRollBack
To post a comment, please login or register a new account.
I have created my own unit, and it has abilities such as attacks,moves,magical skills. But only when human players control this unit, these abilities can be used. The unit controlled by computer AI will not use these abilities. I want to write my own script for the unit, so computer AI can control it just as human does. What should I do? Could you please give me some advice? Thanks!
@victor2100: Go
I know essentially nothing about scripting like that, but could you get a similar effect by enabling auto-cast for the abilities? I've had a little luck with that myself anyway. You have to check the auto-cast and auto-cast enabled flags on the abilities and set auto-cast range (usually) and possibly some validators depending on what ability you're working with.
If that isn't what you need maybe someone else can help with the scripting side of things.